The Google tag lets you send data from your website to connected Google product destinations to help you measure the effectiveness of your website and ads. After you place the Google tag on your website, it sends to linked Google product destinations, such as Google Ads and Google Analytics. You can use a single Google tag implementation for all your products and accounts.
Before you configure the Google tag settings, make sure you set up your Google tag on every page on your website.
This article explains how you can configure your Google tag settings. You can also Manage your Google tag by editing your Google tag name, combining Google tags, or adding or removing destinations.
Open the Google tag settings
Google Ads instructions
Google Analytics instructions
- Open Google Analytics.
- Go to the Admin screen.
- In Data Streams, click on a stream to see details.
Result: Your screen should show you the Google Analytics settings and the Google tag settings.
Campaign Manager 360 instructions
- Open Campaign Manager 360.
- Under “Floodlight”, click Google Tag to edit the Google tag settings.
Google Tag Manager instructions
Note: To see Google tag IDs in Google Tag Manager, you need to manage a Google Ads, Analytics or Google tag in a container.
- Open Google Tag Manager.
- Click on the tab Google tags to see Google tags you have previously set up.
- Click on the tag name to edit the Google tag settings.
Configure your Google tag settings
When you are in your Google tag settings, click Show all to review all available settings.
You may choose to configure settings that are less relevant for your current usage of the Google tag. When you add new product destinations or their capabilities change, the settings will go into effect.
Configuration settings | Description | Relevant to Google Analytics | Relevant to Google Ads |
Relevant to Campaign Manager 360 |
Manage automatic event detection | Configure which types of events your Google tag should automatically detect for measurement in associated destinations. | Yes | Yes | Not Currently |
Configure your domains | Specify a list of domains for cross-domain measurement. | Yes | Yes | Yes |
Allow user-provided data capabilities | Configure whether your Google tag should allow user-provided data to be included in measurement for destination products that accept such data. | Not Currently | Yes | Yes |
Define internal traffic | Define IP addresses whose traffic should be marked as internal. | Yes | Not Currently | Not Currently |
List unwanted referrals | Specify domains whose traffic should not be considered to be referrals. | Yes | Not Currently | Not Currently |
Adjust session timeout | Set how long sessions can last. | Yes | Not Currently | Not Currently |
Override cookie settings | Change how long cookies last and how they are updated. | Yes | Not Currently | Not Currently |
Set consent mode override | Override the default consent settings in your website code and instead set the default to 'denied' for all the regions you choose. | Yes | Yes | Yes |
Manage default consent settings | Indicate whether you've obtained user consent for data sent to Google. | Yes | Yes | Yes |
Manage data use across Google services | Choose which Google services can receive consented data from end users in the European Economic Area (EEA) for advertising purposes. | Yes | Yes | Yes |
Configure your Google tag settings
Manage automatic event detection
Select which types of events your Google tag should automatically detect for measurement in associated destinations. By default, all event types are turned on.
If you turn off automatic event detection, no products or accounts that use this Google tag will be able to receive associated data. You may want to consider turning off collection of these events in your destination instead.
By default, all event types are turned on. Click the switch to turn the following event types off:
- Page views: Detect a page view event each time a page loads. You can't disable this event type.
- Page views on browser history change: Detect a page view event each time the website changes the browser history state. This setting is useful for detecting page views in single-page applications.
- Scrolls: Detect scroll events each time a visitor gets to the bottom of the page.
- Outbound clicks: Detect an outbound click event each time a visitor clicks a link that leads them away from your domain(s). By default, outbound click events will occur for all links leading away from the current domain. Links to domains configured for cross-domain measurement (in the “Configure your domains” setting) will not trigger outbound click events.
- Form interactions: Detect a form interaction or form submission event each time a visitor interacts with a form on your site.
- Video engagement: Detect video play, video progress, and video complete events as visitors view embedded videos on your site. By default, video events will be automatically detected for YouTube videos embedded in your site with JS API support enabled.
- File downloads: Detect a file download event each time a link is clicked with a common document, compressed file, application, video, or audio extension.
Configure your domains
Specify all of your domains that use this tag. This list enables cross-domain measurement and further defines which links on your site do not trigger Outbound Click events when using automatic event detection.
- If you use the same Google tag across domains, they are automatically detected and show up in the Recommendations section. To accept a recommendation, click Add.
To manually add a domain, click Add condition under Include domains that match the following conditions:- Choose a match type.
- Under Domain, enter the identifier for the domain you want to match (e.g., example.com).
- Add each domain you want to include in cross-domain measurement.
- When you’ve specified all the domains that use this tag, click Save.
The changes you make here could affect other Google tags loaded on the same page.
Verify that cross-domain measurement is working properly
Cross-domain measurement works by appending parameters to the URLs on your website. In rare cases, your web server might run into an error, such as returning a 5xx error response code or failing to start a download.
To verify cross-domain measurement works:
- Open a page of your site that contains a link or a form that points to a domain you configured for cross-domain measurement.
- Click the link or submit the form to navigate to the destination domain.
- Verify that the page loads correctly.
- Verify that the URL in the destination domain contains the linker parameter
_gl
. For example:https://www.example.com/?_gl=1*abcde5*
. - If your website provides any downloads: Navigate to a page with the linking parameter in the URL and start a download. Verify that the download starts successfully.
If you encounter an error, try Troubleshooting cross-domain measurement.
Allow user-provided data capabilities
Destination product terms
No data will be collected by destination products if that data is disallowed by that product’s Terms of Service or if the terms required for collecting data from this feature aren’t accepted.
- Google Ads: Google Ads Data Processing Terms
- Google Analytics: Google Analytics Data Processing Terms
- Campaign Manager 360: How Google uses Google Marketing Platform advertising product data
Configuration
- To control whether any destination products can receive data from this feature, enable or disable the Allow user-provided data capabilities option. Note: If you choose to turn off “User provided data”, no products or accounts that use that Google tag will be able to receive data from this feature.
- Choose how you want to include user-provided data. User-provided data will be hashed to keep it private and then sent along to your destination products that are configured to receive it with other event data. You can enable one or more configuration options:
- Automatic detection: Automatically inspect the page for strings that match a pattern for email addresses.
- CSS and variable selectors: Specify CSS selectors or JavaScript variables on your page.
- Manual via code: Modify your Google tag to collect data on the account level, see Setting up enhanced conversions with the Google Tag.
- Click Save.
Define internal traffic
traffic_type
parameter appended with the selected value.- Click Create.
- In the top right corner, select the pencil icon to edit the configuration.
- In the “Rule name” section, give your rule a descriptive name.
- In the “traffic_type” section, choose the name of the
traffic_type
parameter. The default value is ’internal’. - In the “IP address” section, select your match type and enter a value. If you don’t know your IP address, click What’s my IP address?. Matching can be done on either IPv4 or IPv6 addresses. Ranges of IP addresses can be specified using CIDR notation, such as 192.0.2.0/24 or 2001:db8::/32. Learn more about CIDR notation
- Use distinct values to help you differentiate and filter different sets of traffic.
- Click Add conditions. When you’re done, click Create.
List unwanted referrals
ignore_referrer
parameter to events on pages where the traffic source matches the specified domains.- Select to ignore referrals that match any of the following conditions as traffic sources. You can select a match type that:
- Contains
- Begins with
- Ends with
- Exactly matches
- Matches RegEx
- Click Add conditions. When you’re done, click Create.
Adjust session timeout
Products like Google Analytics 4 that receive data from the Google tag use sessions to measure periods of user activity on websites where the tag is installed. Use this feature to change how long sessions should last by adjusting how long it takes before sessions expire due to inactivity or become engaged sessions.
- Adjust session timeout by selecting the hours and minutes. A session is initiated when a webpage is opened. A session ends after a period of inactivity on the part of the user. The default timeout is 30 minutes but can be adjusted here.
- Adjust timer for engaged sessions by selecting the number of seconds. A session becomes an “engaged session“ if it lasts longer than a certain amount of time. The default threshold for engagement time is 10 seconds but can be adjusted here. Learn more about sessions
- Click Save.
Override cookie settings
Change how long cookies last and how they are updated. You can override your Google first-party cookie settings. Learn more about cookies and user identification
Google tags use first-party cookies for various purposes. These cookies have default expiration and update settings, but you can customize these settings by overriding them.
- Click the checkbox to override the default expiration and update settings of cookies used for analytics purposes.
- Set how long before analytics cookies expire. Cookie expiration time will be the current time when the cookie is set or updated plus the value of this field. Learn more about cookie expiration
- Under “Cookie update” choose:
- Set cookie expiration time relative to the most recent visit: By default, each time a user visits your site, your Google tags update the expiration date of associated cookies, extending the cookie lifetime relative to the user's most recent visit.
- Set cookie expiration time relative to first visit: You can optionally set your cookie expiration time relative to your users’ first visit, in which case the expiration is set once and never updated. Learn more about cookie update
- Click Save.
Set consent mode override
The 'Set consent mode override' setting overrides any default consent settings in your website code and instead sets the default to 'denied' for all the regions you choose. After a consent signal is received, the consent setting is updated to the end user's consent choice.
For example, assume you set the default consent to 'denied' in your website code only for France, and then set the consent mode override to 'denied' only for Germany. The setting will override all the default commands set in your website code and only set the default command to 'denied' for Germany.
The setting is useful when setting up consent mode via one of Google’s integrated CMP partners to ensure consent is defaulted to denied in regions where you need this behavior. It can also help if you're having difficulty getting your existing default consent commands to take effect before your Google tags load, such as in cases where your website builder or content management platform do not allow you to specify the order in which plugins are loaded relative to one another. In this case, this setting can be used to provide certainty about the default settings that apply to the tag you are configuring.
To use the setting, you must set Manage default consent settings to "No. Do not automatically mark this data as consented."
Manage default consent settings
Who these settings are for
This Google tag setting lets you set a default consent setting if:
- You don’t use consent mode
- Your Google tags are prevented from loading until a user interacts with your consent banner
If you already use consent mode, the Google tag default settings aren’t applied to your tags. Instead:
- If you use consent mode and don’t engage in personalized advertising, you don’t need to take any action.
- If you use consent mode and rely on ad personalization capabilities, implement consent mode version 2.
Set a default consent state
- If your website or app operates independently of user consent requirements (i.e., you don't use consent mode) or if you have already implemented consent mode, select No. Do not automatically mark this data as consented.
- If you prevent your tags from loading till users have given consent, then all data transmitted to Google will be consented. By selecting Yes. Automatically mark this data as consented, you confirm that all data sent to Google is post consent and should be labeled as consented.
If you upload data from other sources to Google, you need to label that data with user consent as well.
Manage data use across Google services
You can decide which Google services can receive consented end-user data. For optimal measurement, make sure that all Google services receive consented end-user data.
If your business requires you to restrict data sharing across Google services, choose Select Google services. Select all Google services that are allowed to receive user-consented data for measurement and personalization.
Ensure that you declare in your consent banner which Google services receive user-consented data.
When you've configured your Google tag settings, you can manage your Google tag from the “Admin” tab.