Notification

Welcome to the help center for Search Ads 360, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the Search Ads 360 product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

ขณะนี้หน้าที่คุณขอยังไม่พร้อมให้บริการในภาษาของคุณ คุณสามารถเลือกภาษาอื่นได้ที่ด้านล่างของหน้าหรือแปลหน้าเว็บใดๆ ให้อยู่ในภาษาที่คุณต้องการได้ทันที โดยใช้คุณลักษณะการแปลภาษาในตัวของ Google Chrome

Use the Google tag

About the Google tag

This article provides details on using the Google tag for Floodlight conversion actions.

To ensure that the new Search Ads 360 can measure all of your conversions regardless of the browser that your site visitor is using, use the Google tag (gtag.js) as the format for your Floodlight conversion action tags. 

The Google tag sets new cookies on your domain, which stores a unique identifier for a user or the ad click that brought the user to your site. These cookies are refreshed when a user visits your site before the cookie expires. The cookies receive ad-click information from a GCLID (Google click identifier) parameter that's included in the conversion tracking tags.

Since Natural Search in the new Search Ads 360 involves using information from new cookies that are set on your domain, be sure to provide users with clear and comprehensive information about data collection and obtaining consent where legally required. Learn how to opt out of setting first-party cookies on your site’s domain.

Google tag benefits

  • Faster and easier integration with other Google products
    • Use the Google tag for Google Marketing Platform products and other products, such as Google Ads and Google Analytics,. If you use these products, the Google tag makes website implementation easier by providing a unified tagging experience.
  • More accurate conversion tracking
    • Use the Google tag to set new cookies on your domain, which store a unique identifier for a user or the ad click that brought the user to your site. This means Floodlight can measure conversions more accurately.
Due to differences in the way browsers use cookies, there may still be times when conversions can't be measured directly. In these cases, the new Search Ads 360 uses machine learning and historical data to model the number of conversions and amount of conversion revenue that can't be measured directly.

If you use Floodlight iframe or image tags, Google recommends you migrate to the Google tag or use Google Tag Manager with the Conversion Linker to measure conversions more accurately. You also benefit from the latest dynamic features and integrations as they become available.

Since the Google tag can use information from new cookies that are set on your domain, ensure you provide users with clear and comprehensive information about data collection and obtaining consent where legally required.

How the Google tag works

A Google tag for Floodlight comprises two JavaScript snippets:

  • A global snippet
  • An event snippet

Global snippet

The global snippet should be placed in the <head> section of your HTML pages on all of your website's pages. 

Here's an example of the global snippet in a Google tag:

Example

<!-- 

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) - DoubleClick -->

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

<script>

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

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

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

 

 gtag('config', 'DC-1234567');

</script>

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

This code snippet is only an example and won’t work on your website.

When you set up a Floodlight conversion action, you're able to view and copy the Google tag for your account. Learn more about the fields and other information in a global snippet.

Event snippet

The event snippet should be installed on the page with the event you're tracking. It can be placed anywhere on the page after the global snippet. For the best tracking accuracy, place the snippet within the <head> section, just after the global snippet.

Here's an example of an event snippet:

Example

<!--

Event snippet for Thank You on http://www.example.com/thanks: Please do not remove.

Place this snippet on pages with events you’re tracking. 

Creation date: 11/01/2017

-->

<script>

 gtag('event', 'purchase', {

   'allow_custom_scripts': true,

   'value': '[Revenue]',

   'transaction_id': '[Order ID]',

   'send_to': 'DC-1234567/group1/thank123+transactions',

   'u1': '[Custom Floodlight variable]'

 });

</script>

<noscript>

<img src="https://ad.doubleclick.net/ddm/activity/src=1234567;type=group1;cat=thank123;

qty=1;cost=[Revenue];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;

ord=[Order ID]?" width="1" height="1" alt="">

</noscript>

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

This code snippet is only an example and won’t work on your website.

When you set up a Floodlight conversion action, you are able to view and copy the event snippet for your account. Learn more about the fields and other information in an event snippet.

Using the Google tag for multiple Google products

The Google tag can be configured to send data to multiple Google products. For example, if you use Google Analytics, Google Ads conversion tracking, and the new Search Ads 360, you only need one Google tag on every page of your site. For each product, add a 'config' command to the global snippet, so Google knows how to route your data. Each conversion or event you want to track has its own event snippet. Learn how to use a Google tag that tracks conversions for both the new Search Ads 360 and Google Ads.

Cross-domain conversion tracking

You can enable cross-domain tracking to measure activity across multiple domains (such as when your landing page domain is different from your conversion domain), Add a set linker command to the Google tag on pages in your landing domain that can send visitors to your conversion domain. Learn more about cross-domain conversion tracking.

How to opt out

If you don’t want the Google tag to set first-party cookies on your site’s domain, add the highlighted portion below to your global snippet’s config command. Google doesn't recommend this method, as it leads to less accurate conversion measurement.

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

How are Google Tag Manager and Google tag different?

Google Tag Manager and Google tag are separate, independent ways of tagging your website. If you want to manage Google and third-party tags from a single location without modifying your site’s code in the future, use Google Tag Manager. If you want to code tags on your site directly using JavaScript, use the Google tag.

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Main menu
15881222121393845190
true
Search Help Center
true
true
true
true
true
263
false
false