Google Ads (Gtag) Destination

Google Ads (Gtag) quick info

Google Ads (Gtag) accepts Page, and Track calls. If you reference it in the Integrations object, call it “Google AdWords New", or "Google Ads (Google Tag Manager)", or "Google Ads (Gtag)”.

Google Ads (Gtag) accepts device-mode data only from Analytics.js.

Before you begin

If you’re using the new Google Ads (Gtag) experience, you can enable the Google Ads (Gtag) Destination (previously called “Google Adwords New”) in the Segment catalog. The new Google Ads uses a Global Site Tag (Gtag) and event snippets.

Info message.

IMPORTANT: Only use this destination if your Google Ads account is using the New (Gtag) Experience. If you’re using Google Tag Manager (a separate product) as well, don’t add the global site tag again in your GTM containers. You should also disable any Google Ads (Classic) destinations within the same source, since Google Ads (Classic) can’t load at the same times as Google Ads (Gtag).

Getting Started

You can use this destination to map your .page() calls to Page Load Conversions or .track() calls to Click Conversions.

Currently this is only supported on the browser.

Page

If you want to map all your unnamed .page() calls to a default Page Load Conversion, you can enter the AdWords Conversion ID in Settings > Default Page Conversion. However, if you created specific Page Load Conversions in Google Ads that you’d like to map your named .page() calls in Segment, you can map the events in Settings > Page Load Conversions.

Segment forwards all the properties of the page call, such as path, title, url, because by default, Google Ads (Gtag) makes these available in your remarketing campaigns.

You can send Google’s semantic properties, such as value, currency, or transaction_id, as integration specific options. However, Segment recommends you to create a Click Conversion instead, and map them to .track() calls. The example below shows these properties as integration-specific options:

analytics.page({}, {
  'Google Adwords New': {
    value: 25,
    currency: 'USD',
    order_id: 'order123'
  }
});

NOTE: The 'Google Ads (Gtag)' is case sensitive. Segment prefers you to use order_id rather than transaction_id to stay more consistent with the ecommerce spec. However, Segment will send it as transaction_id in the request itself to satisfy Google’s specifications.

Track

You can map your custom .track() events to any Click Conversions you created inside Google Ads. Segment passes any properties so you can use them during your remarketing campaigns.

If you pass properties.value, properties.currency, or properties.order_id, Segment maps them to Google’s semantic value, currency, or transaction_id respectively.

The only exception is that for Order Completed events, Segment will map Google’s semantic value field to your properties.revenue.

Troubleshooting AdWords Conversions

To figure out if an event is flagged for Conversion by the AdWords SDK, follow these steps:

  1. Confirm that the events mapped to Google Ads Conversion are being sent in device-mode while using the Segment Analytics.js library. To do this:
    1. Go to Connections > Sources in your workspace and choose your Source.
    2. Go to the Debugger tab.
    3. Click on an event and look at the Raw view to make sure the events have a library name of analytics.js. There should be a snippet of code that looks like this:
         "library": {
           "name": "analytics.js",
    
  2. Verify that the Google Conversion ID in your Segment workspace is correct.
  3. Find your ad online and click on it. This will redirect you to your website.
  4. Open the Network tab in your browser and make sure the Preserve log checkbox is checked and All is selected. Keep this Network tab and webpage open.

    Network tab

  5. Go to the Settings tab for your Gtag destination in Segment on a new webpage and choose Click Conversions to look at the mapped track() events and make sure the events are mapped to the correct Adwords Conversion Label.

    Edit Settings

  6. Go back to your website and trigger the event mapped to the conversion. For example, as shown in the image above, it would be Order Completed.
  7. Go to the Network tab in your browser and enter the Adwords Conversion Label linked to the event you triggered in the Filter field.

    Network tab

  8. See if the value for the ct_cookie_present changed to true. If true, it means that Adwords counts the event as a conversion.

Multiple Google Ads Accounts

If you are an enterprise that uses multiple Google Ads Gtag accounts (usually managed by various third party agencies) you can override the top level default Google Conversion ID at the event level by entering it into the settings.

Supported Sources and Connection Modes

Before you start, make sure Google Ads (Gtag) supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.

Web Mobile Server
📱 Device-mode ⬜️ ⬜️
☁️ Cloud-mode ⬜️ ⬜️ ⬜️

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

Setting Description
Google Conversion ID
(required)
string. Enter your GOOGLE-CONVERSION-ID. You can get this value from your global site tag snippet. It should look something like AW-901243031
Click Conversions
(required)
mixed, defaults to .

You can map your .track() events to specific AdWords Click Conversions by providing your event name and the Conversion ID.
Conversion Linker boolean, defaults to TRUE .

If you don’t want the global site tag to set first-party cookies on your site’s domain, you should disable this setting. Disabling this is NOT recommended by Google as it can lead to less accurate conversion measurements.
Default Page Conversion string. If you want to map all your default .page() calls that do not explicitly pass in a name to a conversion event, you can enter the Adwords Conversion ID here.
Disable Ad Personalization
(required)
boolean, defaults to FALSE .

Enable this setting to to disable the collection of remarketing data for users who do not wish to view personalized ads. When enabled, Segment will set the allow_ad_personalization_signals AdWords tag parameter to false. For more information about disabling the collection of remarketing data see Google’s documentation here.
Page Load Conversions
(required)
mixed, defaults to .

You can map your .page() calls to specific AdWords Page Load Conversions by providing your page name and the Conversion ID.
Send Page View boolean, defaults to TRUE .

If you want to prevent the global site tag from automatically sending a remarketing hit to your AdWords accounts when the page is viewed, you can disable this setting. Otherwise, by default all properties sent with the conversions will be sent as remarketing hits which will allow you to create audiences based on those properties.

Adding Google Ads (Gtag) to the integrations object

To add Google Ads (Gtag) to the integrations JSON object (for example, to filter data from a specific source), use one of the following valid names for this integration:

  • Google AdWords New

This page was last modified: 20 Jul 2021



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account