Importing User Data to create Google Ads Remarketing Audiences

This guide describes how to import user data into Google Analytics and how to use that data to create remarketing audiences for Google Ads.


Google Analytics provides a rich set of tools to analyze and segment your users, and create Google Ads remarketing audiences when you've linked Google Analytics to Google Ads. Data import can be used to enhance user segmentation and remarketing audiences by allowing you to import and take advantage of user information stored outside of Google Analytics such as in CRM systems.

This article uses the following Google Analytics technologies:

  • User ID
  • Remarketing Audiences
  • Display Features
  • Data import

To learn more about these technologies see the related resources section below.


To leverage your external CRM data to create Google Ads remarketing audiences in Google Analytics there are three main steps:

  1. Configure your account: Link your Google Ads account, create user scoped dimensions and a data set, and upload your user data.
  2. Update your tracking code: Enable the remarketing display feature, and send user scoped data with hit data.
  3. Analysis and taking action: Analyze user data to create user segments, and export the remarketing audience to Google Ads.

Configure your account

There are few one time operations that you will need make in the Google Analytics Admin section. The Google Analytics administration steps are:

  1. Link your Google Analytics and Google Ads accounts
  2. Create user scope dimensions
  3. Create a data set
  4. Prepare and upload data
  5. Upload user data

To export remarketing audiences from Google Analytics to Google Ads you must first link your two accounts. You can either link your accounts programmatically through the API or from the Google Analytics Admin section with the following steps:

  1. In the Property column, click Google Ads Linking -> +New Google Ads Link
  2. Select the Google Ads accounts to link.
  3. Select the views (profiles) you wish to link.
  4. Click Save.
Figure 1: Google Ads account link list.

Create user scope dimensions

To map users to external data from a CRM system you can use custom dimensions to represent the CRM user and imported values in Google Analytics. For example, you could create two user scoped dimensions, CRM User Id, which will be sent with hit data to represent the user, and Lifetime Value, which will be set from CRM data imported into Google Analytics. The steps to create the dimensions are:

  1. Click Custom Definitions -> Custom Dimensions -> + New Custom Dimension.
  2. Name the dimensions and set the scope to User.
  3. Click Create.
Figure 2: User scoped dimension list.

User Id vs custom dimensions

The built-in User ID dimension that is available in Google Analytics is not used in this example to join CRM data with a user since the primary use case for the User ID feature is to enable cross device reporting, not for data import. Using a custom dimension is recommended to prevent data collisions between Id's that are used for the User ID feature and Id's that may be used in external systems.

Create a data set

To import your user data you must create a data set. A data set is used to represent one or more external data sources in Google Analytics. A data set can only be created through the Web Interface.

Under the property tab of the admin page perform the following steps:

  1. Select Data Import.
  2. Click New Data Set.
  3. Select User Data for the type and click Next Step.
  4. Name the data set and select at least one view (profile) and click Next Step.
  5. For the Key select the CRM User Id dimension we defined above.
  6. For Imported Data select the dimension Lifetime Value we created above.
  7. Select an Overwrite hit data option.
  8. Click Save.
Figure 3: Creating a data set.

Prepare user data for upload

Google Analytics expects user data to be uploaded in a properly formatted comma separated file (CSV). You need to make sure the user data meets these requirements before uploading.

The primary modifications and validations that you need to make to the CSV file are:

  • Rename the column headers to those recognized by Google Analytics. You can retrieve the header from the data set details page in the web interface.
  • Add any required values that are missing.

For example you may export your user data from a CRM tool in the following format:

Figure 4: Exported user data from a CRM system.

After properly formatting the data it should look like the following example:


Upload user data

Once you have created your custom dimensions and data set, and prepared your user data for upload in a CSV file, you're ready to upload your content data using the Management API or through the web interface.

Google Analytics' query-time dimension widening (QTDW) allows you to import data after a user visits your site. QTDW will also back-populate audience lists when a new Query Time Data Import dataset is uploaded, attempting to look back at DCLK (or Google Analytics in case of Optimize) cookies for the last 30 days. For more information, see Enable Remarketing and Advertising Reporting Features in Analytics.

Update your tracking code

To correctly match users with uploaded CRM data and to enable remarketing in Google Analytics, there are two changes that must be made to your tracking code:

Your tracking code should look like the following example after the library load snippet:

  ga('create', 'UA-XXXX-Y', 'auto');
  ga('require', 'displayfeatures');
  ga('set', 'dimension1', 'NNNN'); // Where NNNN represents the CRM User Id.
  ga('send', 'pageview');

Analysis and taking action

With the component pieces in place it is now possible to analyze the results and take action. The steps needed to create a remarketing audience from the imported data are:

  1. Create a custom report
  2. Create a segment
  3. Create a remarketing audience

Create a custom report

The easiest way to verify and evaluate the imported user data is to create a custom report. For example:

  1. Click + New Custom Report.
  2. Change the report type to be Flat Table.
  3. Select the Lifetime Value custom dimension we created above.
  4. Select Sessions or any other metric you would like to use to measure a user groups behavior.

Create a segment

Create a segment representing the users you want to target. From the custom report perform the following steps:

  1. Click Add Segment.
  2. Click New Segment.
  3. Click Advanced Conditions.
  4. Change filter from Sessions to Users.
  5. Select the Lifetime Value custom dimension created above.
  6. Add as many conditional groups to the segment as you would like and click Save.
  7. Iterate with the segments conditions and view the results in the custom report until you are satisfied with the segment.

Create a remarketing audience

After creating a segment you can then create a remarketing audience. The steps to create a remarketing audience from the Google Analytics admin page are as follows:

  1. Under the property column click Remarketing -> Audiences.
  2. Click + New Audience.
  3. Select Create my own remarketing type using Segments.
  4. Click Import and select the Lifetime Value custom segment created above.
  5. Select the Google Ads account that will have access to this audience.
  6. Click Save.

Next steps

Once you've created a remarketing audience, it is now time to create a new Google Ads campaign and add your audience to an ad group. See the Google Ads Remarketing Help Center article for details.

Related resources

To learn more about each of the features: