This article is part of the series: DoubleClick and AdWords Cookie Matching

This article covers the AudienceStream requirements for enabling the DoubleClick and AdWords cookie matching between Google and AudienceStream. It describes how to capture the ID and create a related audience. AudienceStream receives a redirect call from Google in this process.

In this article:

Table of Contents Placeholder


In this guide, you will create the following:

  • An event attribute called google_gid for the matching Google cookie value.
  • A rule to detect when the event attribute google_gid is assigned.
  • A visitor attribute (string) to store the google_gid value in the visitor profile.
  • A visitor attribute (Boolean) to indicate when a google_gid value has been stored.
  • An audience of visitors that have a google_gid value.

Google ID Attribute and Rule

Use the following steps to create the basic event attribute for the cookie match value.

  1. Add an event attribute of type string named google_gid.
  2. Create a rule to detect when this attribute is populated.
  3. Create a rule with the following condition:
     google_gid is assigned

Google ID Visitor Attributes

Use the following steps to create two (2) visitor attributes. One attribute will be used to capture the Google ID (visitor-scoped string attribute) and the other will be used to indicate that a value has been captured (visitor-scoped Boolean attribute).

The "Google ID" visitor attribute becomes available in your iQ account and can be used to create a load rule for the cookie match tag.

Use the following steps to capture the value of the Google ID:

  1. Add a visitor attribute of type string.
  2. Set the title to Google ID.
  3. Add an enrichment to set the string according to the following conditions:
    • Set String to: google_gid (attribute)
    • WHEN: Any Page Event
    • Rule: Main - Data Exists - Google ID (previously created rule)
  4. Click Save.

Next, use the following steps to create a Boolean attribute to indicate that a Google ID has been captured:

  1. Add a visitor attribute of type Boolean
  2. Set the title to Google ID Captured.
  3. Add an enrichment and set the value to True according to the following conditions:
    • Set to: true
    • WHEN: Any Event
    • Rule: Main - Data Exists - Google ID (previously created result)
  4. Click Save.

Google ID Audience

In order to take action against these visitors, the visitors must be in an audience.

Use the following steps to create an audience for visitors with a Google ID:

  1. Add an audience.
  2. Set the title to Visitors with a Google ID.
  3. From the the drop-down list, select the Boolean visitor attribute Google ID Captured.
  4. Click Add Filter.
  5. Click Finish.
  6. Publish your changes and proceed to the testing steps.

Testing with Trace

Ensure that Tealium iQ is passing the  trace_id (cp) value to tealium_trace_id in the data mapping of the cookie matching tag.

If enabled, the initial page view triggers two (2) user events. The first event is the standard page load and the second event is the detection of the Google ID.


The visitor profile enriched with the Google ID value and the Boolean displays, as shown in the following example:


Under Strings in the left navigation showing the current state of your visitor profile the Google ID present and the Boolean is set to True, as shown in the following example.


In the last step, you can see that the audience has been joined, as shown in the following example:


AudienceStream is now receiving and storing the Google ID and joining the audience.