Skip to main content

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

Β· 7 min read
Aleksandar Vucenovic
Chief Growth Officer

featured image

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
Beta Feature

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:

ThreatImpact
Ad blockersBlock requests to googletagmanager.com and google-analytics.com
Safari ITPLimits third-party cookies to just 7 days
Browser privacy featuresIncreasingly aggressive at blocking cross-origin tracking
CDN/Proxy servicesCan 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:

  1. 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.

  2. 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​

MetricStandard TrackingWith Proxy
First-party context❌ Noβœ… Yes
Ad blocker bypass❌ Noβœ… Yes
Cookie lifetime (Safari)7 days (ITP)Full duration
Additional cost$0$0
Infrastructure neededNoneNone

⚑ 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:

  1. Intercepts requests to your measurement path
  2. Forwards them to Google's First-Party Servers (*.fps.goog)
  3. 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:

PriorityHandlerHow it worksPerformance
1CDN Proxy (Cloudflare)Requests handled at CDN edge, no server load⚑ Fastest
2Isolated Local ProxyStandalone PHP file, bypasses WordPress coreπŸš€ Fast
3WordPress ProxyWordPress 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.

CDN Proxy Detection

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​

  1. Go to Pixel Manager β†’ Advanced β†’ Google β†’ Tag Gateway
  2. Enter a measurement path (e.g., /mtc)
  3. 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:

PriorityHandlerWhen used
1CDN ProxyCloudflare configured and responding
2Isolated ProxyStandalone PHP file accessible (bypasses WordPress)
3WordPress ProxyFallback via WordPress REST API
4Google CDNUltimate fallback if all proxies fail

Additional Safeguards​

LayerWhat It Does
Health Check Endpoint/mtc/healthy returns ok for monitoring
Proxy Error HandlingGraceful degradation on upstream failures
Empty Response HandlingReturns proper error codes, browser retries
Tag ID ValidationRejects invalid tag IDs before external requests
Path SanitizationSSRF 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:

AspectCDN Proxy (Cloudflare)Isolated Local ProxyWordPress Proxy
Performance⚑ Fastest (edge)πŸš€ Fast (bypasses WP)🐒 Slower (WP core)
Server loadNoneMinimalModerate
Memory usageNone~1-2 MB~15-25 MB
Requires Cloudflareβœ… Yes❌ No❌ No
Setup complexityConfigure in CloudflareAutomaticAutomatic

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​

  1. Open DevTools β†’ Network tab
  2. Load a page on your site
  3. Look for requests to your measurement path (e.g., /mtc/?id=G-XXX...)
  4. Verify they return 200 with 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].