Stay organized with collections
Save and categorize content based on your preferences.
This document is for users who want to deploy the Google tag in first-party
mode. We recommend First-party mode for the most durable tag configuration.
Overview
First-party mode lets you deploy a Google tag using your own first-party
infrastructure, hosted on your website's domain. This infrastructure sits
between your website and Google's services. The setup in this documentation will
help you better measure your website. You can set it up using your existing
Content Delivery Network (CDN), load balancer, or web server.
In standard Google tag setups, your web page requests a Google tag from a Google
domain. When the tag fires, it sends measurement requests directly to the Google
product. In First-party mode, your website loads the Google tag from your
first-party domain. When the tag fires, it sends measurement requests to your
first-party domain, where they are forwarded to the relevant Google product.
This diagram represents the information flow in First-party mode:
Before you begin
This guide assumes that your website is already configured with:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-03 UTC."],[[["This guide provides instructions for deploying the Google tag in first-party mode, offering a more durable and potentially better-performing tag configuration."],["First-party mode involves hosting the Google tag on your own domain, mediating data flow between your website and Google services."],["Your existing CDN or load balancer can be used to forward requests, and the guide assumes you already have a Google tag or Tag Manager container setup."],["Two setup options are available: manual setup or automated setup using Cloudflare."],["Testing involves verifying that event hits are correctly routed through your domain using Tag Assistant."]]],[]]