In this article
Table of Contents Placeholder
Tag Vendor Google Analytics (Universal) + Google Measurement Protocol
Use Case Push Lead Scoring from AudienceStream to Google Analytics
Lead Score (Number) Number based on custom event interactions. This value is initialized to Zero for a new visitor. It is then incremented/decremented based on that visitor's interactions with specific assets on the client's website.
Visitor Value (String) String based on Lead Score value. This value is initialized to "Standard Visitor" for a new visitor. That visitor can then be upgraded to a "High Value Visitor" after crossing a specified Lead Score threshold. In addition, that visitor can fall back to a "Standard Visitor" if their Lead Score drops below that threshold. In this use case, there are only 2 initial values but more can be added to create more stratification between visitors.
Use Case Trigger a GET URL call to Google Analytics to identify if a visitor is a "Standard Visitor" or a "High Value Visitor" based on the audience that their Lead Score puts them in. This process leverages the Google Analytics Measurement Protocol to submit the data.
Sample Scenario The audiences requested to be created are tied to elements from a sample client's scoring model that is built within Marketo, their Marketing Automation platform. The Marketo scoring model gives points for each event that a visitor triggers which then increments their MQL (Marketing Qualified Lead) score in Marketo. By capturing those same events in AudienceStream to create audiences, we can then enrich Google Analytics by submitting the values to custom dimensions. These custom dimensions can then be used passively for lookback analysis of browsing behavior or actively by using them to build remarketing lists in Google Analytics and importing them into Google Ads for advertising purposes within the Google Display Network.
Step 1: Get the Google Analytics Visitor ID (TiQ)
In order for Google Analytics to properly store the hit from the Webhook, the Google Analytics Visitor ID must be provided in the Webhook. This is done in Tealium iQ by parsing the cookie " _ga " (example: GA1.2. 338432152.1402683894) using a Set Data Values extension and storing the 2 longest numbers at the end of the cookie value into a data layer variable. Declare " _ga " as type "First Party Cookie", and " google_visitorid " as type "UDO Variable" in your Data Later tab. Then create the Set Data Values extension as seen below.
See the following code and screenshot example:
The google_visitorid value can then be stored as a a string.
We will set a Boolean to check if the data exists. This is important because the value stored in " google_visitorid " is required for Google Analytics to save the data received from the connector.
Last, we will eventually map the data to the "cid" parameter in the Webhook that we build for Google Analytics
Step 2: Capture Event Information (TiQ)
Step 3: Create Rules and Attributes (AudienceStream)
Initialize Lead Score to Zero for all new visitors. This is done by using the Lifetime Event Count Number and checking if it is Zero.
For all events with positive points, increment the Lead Score by a desired value.
For all negative events, apply the negative credit however it fits the model. In the case of Support, it resets the score to Zero.
If the scoring model is still being refined (as in this use case), make sure to use small values initially so that when you end up refining the model with higher values, visitors with initial lower lead score values do not skew your audiences.
Lead Score < 3 or Lead Score >= 3. These will be used to assign the Visitor Value String next.
For this use case, the initial critical Lead Score threshold is 3. If Lead Score < 3 then set to “Standard Visitor". If Lead Score >= 3 then set to “High Value Visitor".
Step 4: Create Audiences (AudienceStream)
High Value Visitors
When Visitor Value is “High Value Visitor", visitor is a member of this audience.
When Visitor Value is “Standard Visitor", visitor is a member of this audience.
Step 5: Configure Webhook (Google Analytics and AudienceStream)
Create Custom Dimensions in Google Analytics that the Webhook will populate.
The following example configuration is used to trigger the data to Google Analytics.
The following table lists the primary fields that should be populated so the data can be saved correctly in Google Analytics.
While "t" and "ni" are not required based on Google's documentation, they should be set to "event" and "1" respectively so that the Webhook does not impact bounce rate or inflate page views.
This identifies the hit type. This can be a pageview or an event. It's probably best to use an event so that pageviews are not inflated since no page is actually being seen
This is the visitor ID parsed by TiQ
This is the Google Analytics Account Number
This indicates version 1 of the Google Measurement Protocol
This identifies if the hit will be a non-interaction event. By setting it to 1, we don't affect bounce rate
The following table lists parameters that are not required, but will provide additional context in Google Analytics on how to isolate the Webhook events from other events captured by Google Analytics.
Event Category Name
Event Action Name
Event Label Name
AudienceStream Dynamic Parameters
For this use case, the following values are populated from the attributes that were previously configured.
Custom dimension 1 value. In this scenario, it is the Marketo ID
Custom dimension 2 value. In this scenario, it is the Visitor Value which is either Standard Visitor or High Value Visitor
There will be 2 connectors configured. Each one will fire based on when a visitor joins or changes audiences from Standard Visitor or High Value Visitor.
Every new visitor will fire the connector on their first pageview to flag them as a "Standard Visitor". This first connector must fire because Google Analytics does not automatically assign a NULL value to custom dimensions. If you need a default value in a custom dimension, it must be populated with some value. If they eventually join the "High Value Visitor" audience, a second connector will fire to upgrade them to a "High Value Visitor". If that visitor ever leaves that audience and re-joins the "Standard Visitor" audience, the connector will fire again.
Step 6: Act!
Example: Custom Report
Example: Remarketing List based on "High Value Visitor"
Google Analytics can now be integrated with your existing Display Ad campaigns to target your visitors.
... View more
Bikash, You will also want to consider the impact this may have on bounce rate in Google Analytics. By default, an event will be counted as an "interaction" which means it will impact the bounce rate calculation for visitors whose landing page contains id="test" but did not continue to trigger another pageview or different event. For visitors who already continue to see a second page or trigger a different event, they should be okay. You can override this behavior by flagging the desired event as a non-interaction (see https://developers.google.com/analytics/devguides/collection/analyticsjs/events ) which would tell Google Analytics to not include this particular event in the bounce rate calculation but to preserve all other traditional event characteristics. You can accomplish this by passing an additional flag, such as utag.data.event_noninteraction = "1"; and mapping it to Event Non-Interaction within Tealium iQ.
... View more