Google Ads (gtag.js)

Send your event data from RudderStack to Google Ads.

Google Ads is Google’s premier online advertising platform. It can be used for efficient marketing strategies such as product listing, service offerings, as well as activities such as conversion tracking.

info

This destination leverages the gtag.js global site tag - a JavaScript tagging framework that lets you send your event data to Google Ads.

After you set up the destination in RudderStack, the JavaScript SDK automatically loads the gtag.js site tag on your website to start tracking conversions.

Getting started

RudderStack supports sending event data to Google Ads via the following connection modes:

info
You can use the JavaScript SDK to send Page Load Conversions as well as Click Conversions events to Google Ads.
Connection ModeWebMobileServer
Device modeSupported--
Cloud mode---
info
In a web device mode integration, that is, using JavaScript SDK as a source, the Google Ads native SDK is loaded from https://www.googletagmanager.com/ domain. Based on your website’s content security policy, you might need to allowlist this domain to load the Google Ads SDK successfully.

Once you have confirmed that the source supports sending events to Google Ads, follow these steps:

  1. From your RudderStack dashboard, add the source. From the list of destinations, select Google Ads.
  2. Assign a name to the destination and click Continue.

Connection settings

To set up Google Ads as a destination, you need to configure the following settings:

  • Conversion ID: Enter your Google Ads Conversion ID. Refer to the Google Ads support page for more information on obtaining the Conversion ID.
  • Mapping to trigger the Google Ads events for the respective events set here: Use this setting to map custom event names to the standard Google Ads events.
  • Track Conversions: This setting is enabled by default and sends your conversion events to Google Ads. You can disable it to prevent RudderStack from sending the conversion events. When enabled, the following setting is visible:
    • Enable Conversion Events Filtering: Enable this setting to enter a list of events you want to send as conversion events in the Events to Track Conversions setting. When disabled, RudderStack will send all events as conversion events.
  • Track Dynamic Remarketing: Enable this setting to send your dynamic remarketing events. When enabled, the following setting is visible:
    • Enable Dynamic Remarketing Events Filtering: Enable this setting to enter a list of events you want to send as dynamic remarketing events in the Events to Track Dynamic Remarketing setting. When disabled, RudderStack will send all events as dynamic remarketing events.
  • Client-side Events Filtering: This setting lets you specify which events should be blocked or allowed to flow through to Google Ads. Refer to the Client-side Events Filtering guide for more information.
  • Configure Page Load Conversions: For page call, you can configure the page load conversions for multiple instances.
    • Conversion Label: Enter the conversion label from Google Ads.
    • Name: Enter the name of the page event to be sent.
  • Click Event Conversion: For track call, you can configure Click Event Conversion.
    • Conversion Label: Enter your Google Ads conversion label.
    • Name: Enter the name of the track event to be sent.
  • Send Page View: Enable this setting to automatically send your page events to Google Ads.
  • Conversion Linker: This setting is enabled by default. If you don’t want the global site tag (gtag.js) to set first-party cookies on your website domain, disable this setting. Refer to the Google Ads documentation for more information on the Conversion Linker feature.
warning
Disabling this setting can lead to less accurate conversion measurements.
  • Disable Ad Personalization: Enable this setting to programmatically disable ad personalization. Refer to the Google Ads documentation for more information.
  • Allow Enhanced Conversions: Enable this setting to programmatically allow enhanced conversions. Refer to the Google Ads documentation for more information.
  • Use device mode to send events: As this is a web device mode-only destination, this setting is enabled by default and cannot be disabled.
  • Dynamic Remarketing: Enable this setting to allow RudderStack to leverage Google Ads’ Dynamic Remarketing feature for event tracking. Dynamic Remarketing lets you tailor your ads based on your users’ previous interactions with your website.
  • OneTrust Cookie Categories: This setting lets you associate OneTrust cookie consent groups to Google Ads.

Track

You can make a track call with the conversion name to RudderStack for a Click Event Conversion which will, in turn, send this data to Google Ads.

info
RudderStack maps properties.currency, properties.order_id, and properties.revenue to Google Ads’ currency, transaction_id, and value fields respectively. Note that this is applicable only when the Track Dynamic Remarketing setting is disabled in the dashboard.

A sample track call is as shown:

rudderanalytics.track('track conversion', {
  revenue: 125,
  currency: 'INR',
  order_id: 'order_1'
});

A sample track call after enabling the Track Dynamic Remarketing option in the RudderStack dashboard is shown below:

rudderanalytics.track('view_item', {
  'value': 998.55,
  'items': [{
      'id': 1234,
      'google_business_vertical': 'retail'
    },
    {
      'id': 45678,
      'google_business_vertical': 'retail'
    }
  ]
});
success
The format for passing the parameters is quite flexible. You can use the standard Google format for tracking specific categories or use a custom format for tracking custom categories.

A sample track call for a custom event is shown below:

rudderanalytics.track("custom_event", {
  custom_parameter1: "1",
  custom_parameter2: 2,
});

Setting up new customer acquisition reporting

RudderStack supports sending a newCustomer property in your track events to determine whether a converting user is a new customer in your Google Ads campaign. This is helpful in setting up new customer acquisition reporting in Google Ads.

warning
Do not pass this property if you are unsure about the converting user’s status (new or existing customer).

A sample track call highlighting this feature:

rudderanalytics.track('Order Completed', {
  'newCustomer': false,
  'currency': 'USD',
  'price': 43.99,
  'transaction_id': 'A122311',
  "checkout_id": "CHK1044",
  "revenue": 47.99,
  "products": [{
    "product_id": "A1223",
    "name": "car"
  }]
});

Page

You can make a page call with the conversion name to RudderStack for a Page Load Conversion which will, in turn, send this data to Google Ads.

A sample page call is as shown below:

rudderanalytics.page('page view');

A sample page call for a custom event after enabling the Track Dynamic Remarketing option in RudderStack is shown below:

rudderanalytics.page("custom_event", {
  custom_parameter1: "1",
  custom_parameter2: 2,
});

As seen in the above snippet, enabling Track Dynamic Remarketing option in the RudderStack dashboard lets you send custom parameters in the page call.

FAQ

How do I get the Conversion ID?

You can get the conversion ID from your global site tag snippet. For example, a sample conversion ID would look like AW-123456789.

How do I get the Conversion Label for Google Ads?

You can find the value of the Conversion Label from your event snippet. For example, a event snippet would look like send_to: 'AW-123456789/bpg3CMiIjLMBELXBp8wC'. The Conversion Label here is bpg3CMiIjLMBELXBp8wC.


Questions? Contact us by email or on Slack