PixelFox Docs
Hosting

Your own Cloudflare (Google tag gateway)

Serve Google's tags from your own domain through your own Cloudflare account, with Cloudflare's Google tag gateway. Free, and no server to run.

If your site already runs through your own Cloudflare account, you can serve Google's tags (GA4, Google Ads, Google Tag Manager) from your own domain with Cloudflare's Google tag gateway. Cloudflare fetches the Google tag in the background and serves it from a path on your site, then forwards the measurement requests to Google. The requests look first-party, cookies are set on your domain, and you do not host or pay for a server.

This is Cloudflare's feature and it runs entirely in your Cloudflare account. PixelFox does not host it and does not need to be told about it.

What it does, and what it does not

It doesIt does not
Loads the Google tag from your domain instead of a Google domainRun a Google Tag Manager server container
Sends Google measurement requests through your domainSend events to Meta, TikTok or any other platform
Is free and works on any Cloudflare planReplace the PixelFox tag, or its server-side sending

So it improves the Google side of your measurement. Your Meta, TikTok and other conversions still go out server-side from PixelFox, with the same deduplication as before. Use the gateway together with the PixelFox tag, not instead of it. To make the PixelFox tag itself first-party, add a custom ingest endpoint. If you want a GTM server container with your own tags, see shared server-side GTM or forwarding from your own server container.

Before you start

  • Your website's domain is proxied through Cloudflare (the orange cloud).
  • You have your Google tag ID (for example a G- or GTM- ID).
  • Your Cloudflare user has the role the feature requires: Super Administrator, Administrator or Zaraz Admin, or Domain Administrator if you use domain-scoped roles.
  • A Google tag or Google Tag Manager container is already on the site.

Set it up

  1. In the Cloudflare dashboard, open Google tag gateway and select your domain.
  2. Turn the gateway on.
  3. Enter your Google tag ID.
  4. Choose a measurement path: an unused path on your site, such as /metrics. Tags then load from https://yourstore.com/<path>/....
  5. Save. Note that saving overrides any existing GTM script on the site.

You can also turn it on from the Google tag settings or from Google Tag Manager, which can connect to your Cloudflare account.

Cloudflare applies the gateway to the whole zone: every hostname and subdomain in it, including custom hostnames. You cannot enable it for a single subdomain. To limit a tag to one subdomain, use a GTM trigger such as a Page Hostname condition.

Check that it works

  1. Confirm your GTM container has a tag that fires.
  2. Open Tag Assistant, browse your site, and look under Summary → Output → Hits Sent. Hits should go to your measurement path.
  3. In Cloudflare, the Google tag gateway screen should show Active.

Cloudflare and PixelFox hostnames

The hostnames you point at PixelFox, such as t.yourstore.com, are CNAMEs that must stay DNS-only (the grey cloud). The gateway is the opposite: it needs your main website's domain proxied. They are different hostnames, so both can be in place on the same Cloudflare zone.

On this page