If you use Cloudflare as your content delivery network (CDN), you can set up first-party mode in the Google tag by integrating with your Cloudflare account. The integration with the Google tag enables you to gain greater control over your data, improving the accuracy of your Google Analytics reporting and driving conversions uplift.
What is first-party mode?
First-party mode allows you to deploy a Google tag using your own domain, enhancing data privacy and improving signal measurement recovery. Unlike standard setups where tags are requested from a Google domain, first-party mode loads the tag from your domain and sends measurement events to your domain, where they are forwarded to Google.
Before you begin
- You have the Google tag (e.g., i-gno/re-d123, AW-456) running on your website.
- Sign in to your Cloudflare account and grant permissions to Google to set up first-party mode.
Set up first-party mode with the Google tag
Step 1 of 2: Open the Google tag settings
Google Ads instructions
To access your Google tag settings from your Google Ads account:
- In your Google Ads account, click the Tools icon
.
- Click Data manager.
- Under “Google tag”, click Manage, then go to Admin.
Google Analytics instructions
- In your Google Analytics account, go to the
Admin screen.
- In
Data streams, click a stream to see details.
- Click Configure tag settings, then go to Admin.
Campaign Manager 360 instructions
- Open your Campaign Manager 360 advertiser.
- Under “Floodlight”, click Google Tag.
- In the Google tag settings, go to Admin.
Google Tag Manager instructions
- In your Google Tag Manager account, click the Google tags tab to see Google tags you've previously set up.
- Note: To see Google tag IDs in Google Tag Manager, you need to manage a Google Ads, Analytics or Google tag in a container.
- Click the tag name to edit the Google tag settings.
Step 2 of 2: Configure your Google tag settings
- In Admin, click First-party mode.
- In the “First-party mode” screen, click Continue.
- Confirm your measurement path.
- Note: If you need to customize your measurement path, choose a path that’s not already in use on your website.
- Click Sign into Cloudflare to log in to your Cloudflare account.
- After successfully logging in, all websites with first-party mode enabled will be listed.
- Click Complete setup.
Results
After you successfully set up first-party mode with the Google tag using Cloudflare, an "Active" status will display next to each website domain where first-party mode is running.
If you want to enable first-party mode for per domain, click Configure in the upper right corner, then click Edit in Cloudflare.
If there was a problem during setup, you’ll be presented with the option to try again. If you continue to receive an error message, you should set up first-party mode from the Cloudflare interface instead of the Google tag interface.
If your Cloudflare account is undetected or incompatible, you can set up first-party mode manually.
Validate the first-party mode set up from Tag Assistant
You can confirm if your first-party mode setup is working correctly by using Tag Assistant.
Verify where the script is loaded from by following these steps:
- Ensure that your Google Tag Manager container has at least one tag that fires.
- Open Tag Assistant and enter your website URL to create the connection.
- Navigate through your website to trigger tags.
- In the Summary > Output > Hits Sent tab, verify that the hits are routed to your measurement path.
Deactivate first-party mode
- In the “First-party mode” screen, click Configure.
- Click Pause to deactivate first-party mode in Cloudflare.
- Click Delete to detach Cloudflare from your Google tag and remove the first-party mode configuration.