Pass a Google Analytics Custom Dimension through AudienceStream for RLSA AdWords

Pass a Google Analytics Custom Dimension through AudienceStream for RLSA AdWords

by on ‎11-09-2018 06:59 AM - edited a week ago by Community Manager (42 Views)

Google Analytics (GA) can be linked to Google AdWords. A GA custom dimension can be used as the basis of a GA audience. Therefore, with GA linked to AdWords, this approach can be used to add or remove visitors from RLSA segments in AdWords.

Pre-requisities

  • Google Analytics
    The non-premium version is acceptable, but will be limited to 10M hits per month. This includes both the hits from the page and the AudienceStream connector firing.
  • The Google Analytics tag (gtag version) will need to be present on the page to fire at least once per session.  The Display Advertising Feature setting for this tag needs to be switched on, see screenshot below

gtag.png

  • AudienceStream and the Collect tag feeding it.
  • It is not required as part of the setup below to enable the collection and storage of the user’s IP address in AudienceStream.  This was previously thought to be true.
  • A target Audience set up in AudienceStream.
  • A custom dimension set up in Google Analytics, scoped to the User level.
  • Google Analytics linked to Adwords (you do this under “AdWords Linking” in the Admin Section of Google Analytics)

Capture Google Analytics Client ID in iQ

Add a Set Data Value extension scoped to the Tealium Collect tag to set the variable ga_cid to the GA first-party visitor cookie with the leading part removed. This allows AudienceStream to identify the same user as the tag.

The code snippet is:

ga.getAll()[0].get('clientId')

ga.png

Using the Google Client ID in EventStream and AudienceStream

The first step is to create the event and visitor attributes to capture the client ID coming in from the Collect tag.

  1. In EventStream, add an event attribute of type string, named “ga_cid”.
  2. Add a visitor attribute of type string also named “ga_cid” and set this to the event attribute ga_cid when that event data attribute is assigned.
    ga_cid.png

The next step is to create the Google Analytics connector.

  1. In AudienceStream, go to Connectors and add the Google Analytics Connector.
  2. Enter the Google Tracking ID from your Google Analytics Admin page.
  3. Add a Send Analytics Event Data action.
  4. Set Source audience used to segment the users.
  5. Map the visitor attribute “ga_cid” to Client ID.
  6. Map a custom value of "1" to "Non-interactive".
  7. Map a value to the custom dimension number you’re going to use in Google Analytics. You could make this be a fixed string, for example “In Audience XYZ”. In the screenshot below, we are setting custom dimension 1 in GA to the value “In Audience XYZ” when the user enters our audience in AudienceStream.
  8. You will need to provide a value for the Event Category and Event Action. These could again be something like “Joined Audience XYZ”
  9. Set "When" to "Joined Audience"mapping.png

Depending on the nature of your use case, you may be able to reuse the same custom dimension for multiple audiences, as long as the audiences are mutually exclusive (for example a progression). If they are, then you can duplicate step 3 above for each audience involved. If they are not, then you probably want the GA custom dimension to be set to a different value when the visitor leaves the audience. In this case, duplicate step 3, but set the “When” to “Left Audience”

Creating a Google Analytics Audience Based on the Custom Dimension

You do this under “Audience Defintions, Audiences” in the Admin section of Google Analytics.

  • The “View” can be “All Web Site Data”
  • The “Destination Account” should be the same Account ID you see as your Customer ID in Google Adwords
  • You should define the Audience to be when the custom dimension has the value you are passing to it from AudienceStream.image2.png