Use the Google tag

To ensure that Display & Video 360 can measure your conversions effectively, we recommend that you use the Google tag (gtag.js) as the format for your Floodlight activities.

About the Google tag

The Google tag is a site-wide web tagging library that works across Google’s site and conversion measurement products - giving you better control while making implementation easier.

  • Faster and easier integration with other Google products: The Google tag is not only used by Google Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager 360) but also by other Google products such as Google Ads and Google Analytics. If you use these products, the Google tag makes implementation easier by providing a unified tagging experience.
  • More accurate conversion tracking: Using the Google tag sets new cookies on your domain. This ensures that Google Marketing Platform can measure your conversions more accurately. If you’re using iframe or image tags instead of the Google tag, Google Marketing Platform is not able to observe all of your conversions.
 
Make sure you enable Enhanced attribution when setting up your Floodlight configuration to see the benefits of improved conversion tracking for display and video inventory. Learn how to enable Enhanced attribution

Unsupported environments

  • The Google tag is not intended to work in mobile apps. Learn more about options for using Floodlight with apps.
  • The Google tag doesn’t support Accelerated Mobile Pages (AMP). You should continue to follow the existing process for using Floodlight with AMP.
  • The Google tag won’t fire in browsers that don’t support JavaScript. The tag includes a <noscript> section that will load if JavaScript isn’t supported. Learn more below

Cookies set by the Google tag

When using the Google tag for Floodlight activities, the tag sets new cookies on your domain, which will store a unique identifier for a user or the ad click that brought the user to your site.

  • Search Ads 360: The cookies receive the ad click information from a GCLID (“Google Click Identifier”) parameter that Search Ads 360 adds to the landing page URL just before redirecting users to your site.
  • Display & Video 360 and Campaign Manager 360: The cookies receive the ad click information from a DCLID (“DoubleClick Click Identifier”) parameter that Display & Video 360 and Campaign Manager 360 adds to the landing page URL just before redirecting users to your site.

If you don’t want the Google tag to set first-party cookies on your site’s domain, you can opt out by adding the highlighted portion below to your global snippet’s config command:

gtag('config', 'DC-1234567', {'conversion_linker': false});

We don’t recommend doing this as it will lead to less accurate conversion measurement.

Since the Google tag is able to use information from new cookies that are set on your domain, please ensure that you’re providing users with clear and comprehensive information about data collection, and obtaining consent where legally required.

Collection of remarketing data by Google tag

Once you set up the Google Ads tag for standard remarketing or dynamic remarketing, the Google tag, and an optional event snippet can be deployed site-wide to track specific remarketing events.

You can choose to disable the collection of remarketing data for users who do not wish to view personalized ads using the parameter: allow_ad_personalization_signals. This parameter will let you disable the usage of the data for personalized ads and the default value of the parameter will be set to true. When you set the parameter’s value to false, it will disable the usage of the data for personalized ads.

If you don’t want the Google tag to collect remarketing data, add the highlighted gtag('set') command to your Google tag above the gtag('js') command:

<!--

Start of global snippet: Please do not remove

Place this snippet between the <head> and </head> tags on every page of your site.

-->

<!-- Google tag (gtag.js) - Google Marketing Platform -->

<script async src="https://www.googletagmanager.com/gtag/js?id=DC-[floodlightConfigID]"></script>

<script>

 window.dataLayer = window.dataLayer || [];

 function gtag(){dataLayer.push(arguments);}

 gtag('set', 'allow_ad_personalization_signals', false);

 gtag('js', new Date());

 

 gtag('config', 'DC-[floodlightConfigID]');

</script>

<!-- End of global snippet: Please do not remove -->

 

Implement the Google tag

A Google tag is made up of two snippets of JavaScript: a global snippet and an event snippet. Insert the Google tag between the <head> and </head> tags on every page of your site. The global snippet is placed on all pages, and the event snippet is additionally placed on pages with events you’re tracking. Website administrators will need to pass values into certain fields in the Google tag.

Passing data to fields in the Google tag

If you’re migrating from iframe or image tags to the Google tag, see our retagging guide to learn more about how parameters from these tags map to fields in the Google tag.

Sample Google tag

Here’s an example of a complete Google tag, with both a global snippet and an event snippet:

Adapt an existing Google tag for multiple Google products

If you already have a Google tag, you can configure it to send data to multiple Google products by:

  • Updating the global snippet to include identifiers for each product.
  • Using separate event snippets for each product.

For each additional Google product you want your tag to support, add a new config command with the right account identifier.

Note that the identifier in the src= part of the tag is set when you first generate a Google tag. It doesn’t determine which accounts will receive data from the tag. In the example above, the tag was originally generated from Analytics, so the src= contains an Analytics ID. Which accounts receive data from the Google tag is determined by the config command and by using event snippets specific to each product with a send_to field that routes to that product.

Frequently asked questions

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

13691844916097239745
true
Search Help Center
true
true
true
true
true
69621
Search
Clear search
Close search
Main menu
true
false
false
false