Google Tag Gateway Proxy: First-Party Tracking Built Right Into WordPress

What if you could route all your Google Analytics and Google Ads tracking through your own domain, without any external services, cloud infrastructure, or ongoing costs?
Starting with version 1.53.0, you can. Pixel Manager now includes a built-in Google Tag Gateway Proxy that makes your tracking truly first-party. Just set a measurement path, and you're done.
β TL;DR
- Route Google tracking through your own domain. No external services required.
- Bypass ad blockers and browser restrictions automatically
- Extend cookie lifetimes beyond Safari's 7-day ITP limit
- One setting to enable, multiple fallback mechanisms to ensure tracking never breaks
- Zero additional infrastructure costs
This feature is currently in beta. While we've implemented multiple fallback mechanisms to ensure your tracking never breaks, we recommend testing thoroughly in a staging environment before deploying to production.
π΄ The Problem: Third-Party Tracking Is Dyingβ
If you've been running Google Analytics or Google Ads on your WooCommerce store, you've probably noticed your data getting worse. Here's what's happening:
| Threat | Impact |
|---|---|
| Ad blockers | Block requests to googletagmanager.com and google-analytics.com |
| Safari ITP | Limits third-party cookies to just 7 days |
| Browser privacy features | Increasingly aggressive at blocking cross-origin tracking |
| CDN/Proxy services | Can interfere with tracking scripts |
The result? Missing conversions. Incomplete attribution. Shrinking remarketing audiences.
π’ The Solution: Make It First-Partyβ
Google introduced First-Party Servers (FPS) to solve this. The concept is simple: route tracking through your own domain so browsers treat it as first-party.
Previously, implementing this required one of two approaches:
-
Cloudflare Integration: If you were already using Cloudflare, we offered a simple one-click setup. Great if you're on Cloudflare, but not everyone is.
-
Complex Proxy Setup: For everyone else, it required your hosting provider to configure a reverse proxy on the server. Most hosting providers don't offer this, and those that do often charge extra or require back-and-forth with support to get it set up correctly.
Now? One setting in Pixel Manager. No Cloudflare required, no complex infrastructure.
What You Getβ
| Metric | Standard Tracking | With Proxy |
|---|---|---|
| First-party context | β No | β Yes |
| Ad blocker bypass | β No | β Yes |
| Cookie lifetime (Safari) | 7 days (ITP) | Full duration |
| Additional cost | $0 | $0 |
| Infrastructure needed | None | None |
β‘ How It Worksβ
Before (Third-Party):
Browser β googletagmanager.com β Google
After (First-Party with Proxy):
Browser β yourstore.com/mtc/ β Pixel Manager β Google FPS
When the proxy is enabled, Pixel Manager:
- Intercepts requests to your measurement path
- Forwards them to Google's First-Party Servers (
*.fps.goog) - Rewrites URLs in responses so the entire flow stays first-party
Your visitors never see requests to Google domains. To browsers and ad blockers, it's all happening on your site.
Automatic Handler Detectionβ
Pixel Manager automatically detects the best available handler and uses it in the following priority order:
| Priority | Handler | How it works | Performance |
|---|---|---|---|
| 1 | CDN Proxy (Cloudflare) | Requests handled at CDN edge, no server load | β‘ Fastest |
| 2 | Isolated Local Proxy | Standalone PHP file, bypasses WordPress core | π Fast |
| 3 | WordPress Proxy | WordPress core request processing | π’ Slower |
This detection happens automatically on the server side and is cached for performance. You don't need to configure anything β Pixel Manager will always use the fastest available option.
When you enable or disable a CDN proxy (such as Cloudflare), it may take up to 24 hours before the Pixel Manager detects the change. The handler detection is cached for performance.
π§ Setup: One Setting, That's Itβ
- Go to Pixel Manager β Advanced β Google β Tag Gateway
- Enter a measurement path (e.g.,
/mtc) - Click Save
Done. The proxy activates immediately. No additional configuration, no server setup, no DNS changes.
Pixel Manager automatically:
- Routes all Google tag requests through your domain
- Flushes WordPress rewrite rules when you change the path
- Starts proxying to Google's First-Party Servers
π‘οΈ Multiple Fallback Mechanismsβ
We've built this with reliability as the top priority. Your tracking should never break, even if something goes wrong with the proxy.
Fallback Priorityβ
The Pixel Manager tries handlers in this order until one succeeds:
| Priority | Handler | When used |
|---|---|---|
| 1 | CDN Proxy | Cloudflare configured and responding |
| 2 | Isolated Proxy | Standalone PHP file accessible (bypasses WordPress) |
| 3 | WordPress Proxy | Fallback via WordPress REST API |
| 4 | Google CDN | Ultimate fallback if all proxies fail |
Additional Safeguardsβ
| Layer | What It Does |
|---|---|
| Health Check Endpoint | /mtc/healthy returns ok for monitoring |
| Proxy Error Handling | Graceful degradation on upstream failures |
| Empty Response Handling | Returns proper error codes, browser retries |
| Tag ID Validation | Rejects invalid tag IDs before external requests |
| Path Sanitization | SSRF and path traversal protection |
If the proxy ever has issues, tracking automatically falls back to standard Google URLs. You can also disable the proxy instantly by clearing the measurement path.
π Performance: Minimal Overheadβ
Bot Exclusionβ
Known bot user agents (Googlebot, Bingbot, etc.) are automatically excluded from the proxy. Instead of hitting your server, they're redirected to the standard googletagmanager.com endpoint. This prevents crawlers and monitoring tools from unnecessarily stressing your server while still allowing them to see the tracking scripts if needed.
βοΈ Trade-offs: Proxy Options Comparedβ
The Pixel Manager automatically selects the best proxy for your setup. Here's how the options compare:
| Aspect | CDN Proxy (Cloudflare) | Isolated Local Proxy | WordPress Proxy |
|---|---|---|---|
| Performance | β‘ Fastest (edge) | π Fast (bypasses WP) | π’ Slower (WP core) |
| Server load | None | Minimal | Moderate |
| Memory usage | None | ~1-2 MB | ~15-25 MB |
| Requires Cloudflare | β Yes | β No | β No |
| Setup complexity | Configure in Cloudflare | Automatic | Automatic |
How it works: The Pixel Manager detects which handlers are available and automatically uses the fastest one. If you have Cloudflare configured, it uses the CDN proxy. If not, it uses the isolated local proxy (a standalone PHP file that doesn't load WordPress). The WordPress proxy (which loads only WordPress core, not plugins/themes) is only used as a final fallback.
Our recommendation:
- Already on Cloudflare? Configure the Cloudflare integration. The Pixel Manager will automatically detect and use it.
- Not on Cloudflare? The isolated local proxy provides excellent performance. It bypasses WordPress entirely, so each tracking request uses minimal server resources.
β Compatibilityβ
Works Withβ
- All major page caching plugins (WP Rocket, W3 Total Cache, LiteSpeed, etc.)
- Cloudflare and other CDNs
- Nginx and Apache
- WordPress Multisite
- WooCommerce checkout (classic and blocks)
- All consent management plugins supported by Pixel Manager
Requirementsβ
- PHP 5.6+
- WordPress 5.0+
- Pixel Manager
1.53.0+
π§ͺ Testing Your Setupβ
Verify the Proxy Worksβ
- Open DevTools β Network tab
- Load a page on your site
- Look for requests to your measurement path (e.g.,
/mtc/?id=G-XXX...) - Verify they return
200with JavaScript content
Check the Health Endpointβ
curl https://yourstore.com/mtc/healthy
# Should return: ok
π Why This Mattersβ
The Google Tag Gateway Proxy brings enterprise-level first-party tracking to every WooCommerce store:
- Better tracking accuracy: Bypass ad blockers and browser restrictions
- Longer cookie lifetime: First-party cookies aren't limited by ITP
- Zero additional cost: Uses your existing WordPress hosting
- Automatic fallbacks: Tracking never breaks
- Simple activation: One setting, no configuration
No server-side GTM. No cloud infrastructure. No ongoing costs.
π Get Startedβ
Update to Pixel Manager 1.53.0, set your measurement path, and start capturing the conversions you've been missing.
Interested to get updates?
Sign up to our monthly newsletter today.Questions or feedback about the beta? Reach out to us at [email protected].
