- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
In this article
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:
b["cp._ga"].split(".").splice(2,2).join(".")
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
Configure the events in TiQ that will adjust the Lead Score metrics in AudienceStream. This usually involves calling utag.link() on specific website assets when they are clicked on or interacted with. For this step, you'll have the option to use the jQuery onHandler() extension or a JavaScript Code extension to capture these events. These will both submit the data Google Analytics and AudienceStream.
For this use case, we've chosen to use the Javascript Code extension and used jQuery to capture all the events. Some examples of positive events from this use case are interactions with assets like case studies, white papers, videos, webinars, and more. It also includes negative events, such as Support, which will negatively impact Lead Score by either decrementing the value or resetting it to Zero.
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".
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.
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.
Field | Description |
---|---|
t=event |
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 |
cid=12345.6789 |
This is the visitor ID parsed by TiQ |
tid=UA-12345-1 |
This is the Google Analytics Account Number |
v=1 |
This indicates version 1 of the Google Measurement Protocol |
ni=1 |
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.
Field | Description |
---|---|
ec=ASConnector |
Event Category Name |
ea=VisitorValue |
Event Action Name |
el=StandardVisitor |
Event Label Name |
dp=/webhook/ |
Document path |
dt=Webhook |
Document title |
For this use case, the following values are populated from the attributes that were previously configured.
Field | Description |
---|---|
cd1=id:123-ABC-456&token:_mch-site.com-123456-789 |
Custom dimension 1 value. In this scenario, it is the Marketo ID |
cd2=StandardVisitor |
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.
Google Analytics can now be integrated with your existing Display Ad campaigns to target your visitors.
Copyright All Rights Reserved © 2008-2021