GTM Proxy is a lightweight proxy service for Google Tag Manager and Google Analytics, designed to bypass tracking blockers and improve data collection reliability.
- Proxies Google Tag Manager JavaScript
- Handles Google Analytics collection endpoints
- Customizable paths and hostnames
- Simple configuration with TOML
- High performance with caching support
docker run -d --restart always --name gtm-proxy \
-p 8000:8000 \
-v /path/to/config.toml:/app/config/config.toml \
illustar0/gtm-proxy:latestor
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:latestuseHost: Use the request's Host header (true) or customHost (false)customHost: Custom hostname for proxyingcustomGtmJsPath: Path for the GTM JavaScript filecustomGtagJsPath: Path for the Gtag JavaScript filecustomGtagDestinationPath: Path for Gtag destination endpointcustomAnalyticsCollectPath: Path for Analytics collection endpointserverHeader: Add server identification header
timeout: HTTP request timeout in secondsmaxConnections: Maximum concurrent connectionscacheCapacity: Cache size for responses
host: Server bind addressport: Server portreload: Enable auto-reload for development
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>This project is licensed under the MIT License - see the LICENSE file for details.