Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Illustar0/gtm-proxy

Repository files navigation

GTM Proxy

License

English | 中文

Description

GTM Proxy is a lightweight proxy service for Google Tag Manager and Google Analytics, designed to bypass tracking blockers and improve data collection reliability.

Features

  • Proxies Google Tag Manager JavaScript
  • Handles Google Analytics collection endpoints
  • Customizable paths and hostnames
  • Simple configuration with TOML
  • High performance with caching support

Usage

docker run -d --restart always --name gtm-proxy \
        -p 8000:8000 \
        -v /path/to/config.toml:/app/config/config.toml \
        illustar0/gtm-proxy:latest

or

docker run -d --restart always --name gtm-proxy \
        -p 8000:8000 \
        -v /path/to/config.toml:/app/config/config.toml \
        ghcr.io/illustar0/gtm-proxy:latest

Configuration Options

Common

  • useHost: Use the request's Host header (true) or customHost (false)
  • customHost: Custom hostname for proxying
  • customGtmJsPath: Path for the GTM JavaScript file
  • customGtagJsPath: Path for the Gtag JavaScript file
  • customGtagDestinationPath: Path for Gtag destination endpoint
  • customAnalyticsCollectPath: Path for Analytics collection endpoint
  • serverHeader: Add server identification header

HTTP

  • timeout: HTTP request timeout in seconds
  • maxConnections: Maximum concurrent connections
  • cacheCapacity: Cache size for responses

Server

  • host: Server bind address
  • port: Server port
  • reload: Enable auto-reload for development

Integration

In your website, replace the standard GTM script with:

<!-- Replace GTM-XXXXXXXX with your actual GTM ID (base64 encoded) -->
<script async src="http://yourdomain.com/js/jQuery.js?id=R1RNLVhYWFhYWFhY"></script>

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

About

A simple Google Tag Manager Proxy.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •