Google Analytics Ad Audiences



Google Analytics link is an experimental feature with some limitations to consider. The data imports feature in Google Analytics integration only allows creation of audiences for customers who visited the website in the last 30 days AND have consented to ads & retargeting. Furthermore, our tests have shown that many clients are losing a significant portion of cookies during the matching process. We have contacted Google regarding this issue but were not able to pinpoint the exact root cause.

Until this is resolved, we recommend using the native Google Ads integration for creating Customer Match audiences in Google Ads. It is newer, more reliable, and it provides some new possibilities, such as targeting Display network, User ID audiences, integration with DV360, etc. Google has also recommended using this approach instead of data imports.

Remarketing campaigns show advertisements to people who visited your online store, but who are now on other websites. Exponea allows you to create marketing automation scenarios that reach out to these customers and present personalized messages to them.

This guide will help you to create a remarketing scenario that creates a remarketing audience from your website's customer list and uploads their details to Google Ads.

There are two possible ways of integrating Exponea with Google Ads audiences:

  1. Connect your Google Ads account with Exponea and use Google’s Customer Match feature to create custom audiences based on customer’s email address or customer’s mobile ID if you want to retarget users of your mobile application. Note: Using this option You can only target customers through Search, Gmail, and YouTube.

  2. Connect your Google Analytics account with Exponea and create a Google Analytics audience based on Google Analytics cookie. Then import this Google Analytics audience to Google Ads. Note that this is an experimental feature which is still under development. However, it allows you to target customers through the Google Display Network, which is not possible through Google Ads Customer Match integration.


This article will now explain how to create a Google Analytics audience and use that for retargeting. To learn how to achieve this through Google Ads Customer Match instead, click here.

Retargeting through Google Analytics


Requirements for this implementation

  • Edit rights for your Google Analytics account
  • Edit rights for your Google Ads account
  • Publish access to Google Tag Manager container
  • Google Analytics property linked to Google Ads account
  • Your website uses the latest Google Analytics tracking library. The legacy ga.js library is currently not supported by Exponea SDK

Step 1: Integrate your Google Ads and Google Analytics accounts with your Exponea project

Go to integrations and connect your Exponea project to your Google Ads account, as shown below.

Then do the same with your Google Analytics account.

In case you encounter an error "This app is blocked" or similar, please contact our Support. Note that Google requires your Exponea instance to get verified by Google prior to integrating, since Exponea processes sensitive customer data. Our Support will engage in the verification process once contacted.

Step 2: Set up and check Google Analytics cookie tracking in Exponea.

a. Set up Google Analytics tracking in Web Integration settings and copy the updated snippet into your website (turning on the checkbox in Web integration settings will not start to track GA IDs automatically without updating the snippet on your website).

b. Verify that Exponea is tracking Google Analytics Client ID correctly. You can do this by looking at any customer who has visited your website Data & Assets > Customers.

Step 3: Create two custom dimensions in Google Analytics that will be used to store the data needed to create custom audience segments.

a. In Google Analytics property settings, create two new custom dimensions:

  • “Client ID tracked online” dimension, User Scope - this will be used to store information about Client ID for a particular customer in Google Analytics. This is needed because Google Analytics is able to create audiences based only on User ID or other parameters such as custom dimensions, but not based on Client ID.

  • “Custom User Dimension: Attribute 1” dimension, User Scope - this will be used to store the name of the audience segment for retargeting.

b. Mark the index numbers of these customer dimensions, you will need that later.

Step 4: Set up the tracking of Client ID into the newly created Google Analytics custom dimension

a. Ensure that you are storing the Google Analytics Property ID in a Constant Variable for easier management. You can name it GA Property tracking ID.

b. Create a new Custom JavaScript variable in your Google Tag Manager container. Name: Get Client ID for current Tracker

c. Insert the following code that will grab the current client ID:

function() {
  try {
    var trackers = ga.getAll();
    var i, len;
    for (i = 0, len = trackers.length; i < len; i += 1) {
      if (trackers[i].get('trackingId') === {{GA Property tracking ID}}) {
        return trackers[i].get('clientId');
  } catch(e) {}  
  return 'false';

d. Set up a new variable of type Google Analytics Settings, which will store the Client ID into one of the GA custom dimensions. Index of the custom dimension should be the same as you’ve created in STEP 2. Name: GA Setting for Client ID as Custom Dimension

e. Create new trigger “Page view - client ID exists” (type Window Loaded) + settings This trigger fires on “Some Window Loaded Events” and condition “Get Client ID for current Tracker does not equal false

f. Create new tag “Event Tag - Client ID as Custom Dimension” that is triggered by trigger “Page view - client ID exists”

g. Google Tag Manager will now store Google Analytics Client ID into defined custom dimension. We can check if this is working correctly in Google Analytics User Explorer report after a few hours after publishing the GTM container update.

Step 5: Configure import data set in Google Analytics

In this step, we will set up the data structure in which Exponea will be sending data to Google Analytics.

a. Create new data import in Google Analytics Property Settings > Data Import > New

b. Data Set type: Custom data

c. Name the data set and choose views into which the data will be imported

d. Set custom dimension “Client ID tracked online” (index 1 in our case) as Key. Set custom dimension “Custom User Dimension: Attribute 1” (index 2 in our case) as Imported data.

Step 6: Configure the Retargeting node in Exponea scenario builder

a. Go to Exponea's Scenario Builder and add a new retargeting node.

b. Set up the retargeting node as Google Ads node that will use Google Analytics link.

c. In the Audience dropdown box, select **Create new** option to create a new audience.

d. Set up the new remarketing audience by filling out the following details:

  1. Google Ads integration - select which Google Ads integration you would like to use. Usually you need only one integration in Exponea so this is quite straightforward.

  2. Choose your own Audience name - this is how the audience will end up showing up in Google Analytics and Google Ads.

  3. Choose Audience duration - the number of days until customers in the audience will expire. By default, this is set to 180 days (you can change it up to 540 days)

  4. Set Custom data source based on the name of the Data Import that you’ve created in step 4, e.g. “Client ID import”.

  5. Profile view - choose the same Google Analytics view that you’ve configured in step 4.

  6. Client ID Dimension - choose the name of the first custom dimension in GA that you’ve created in step 2, e.g., “Client ID tracked online”. This dimension is used to track Client IDs in GA in separate dimensions, which is needed for the data import to work correctly.

  7. Dimension - choose the name of the second custom dimension in GA that you’ve created in step 2, e.g. “Custom User Dimension: Attribute 1”. This dimension will store the name of your custom audience segment.

  8. Dimension value - This is the name of the audience you would like to store in the Custom Segment dimension.

Step 7: Create a custom audience in Google Analytics and link this audience to Google Ads Account

a. In Google Analytics Property settings, Audience Definitions, create a new audience by using the conditions as indicated in the screenshot below:

b. Choose the Ads account ID that you would like to use to import this audience into.

Step 8: Create scenario logic in Exponea and launch the scenario.

You can create any simple or advanced scenario logic to be used for triggering the retargeting node. You may find a simple example below, which basically imports all customers with email address into Google Ads audience.


Bear in mind that sending customers’ private information from Exponea to advertising platforms is not something that your customers might expect so be sure to do this only after considering and implementing all the necessary legal and regulatory requirements.

Wait for a few days and monitor the size of the audience in Google Analytics Property settings (Audiences). Depending on your website traffic it might take 1-3 weeks to populate your Analytics audience based on Exponea data.

Step 9: Configure and launch the campaign in Ads to use your custom audience created by Exponea.

Updated about a month ago

Google Analytics Ad Audiences

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.

We rely on cookies

to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

Manage cookies
Accept & close

Cookies preferences

Accept & close