To get more valuable insights from your data, you'll have to add context. This way we can bring more emotion and intent into our Analytics data.
Intent you say?
In Marketing Automation tools like HubSpot, you can build internal logic to segment leads in marketing persona's or add them into a customer lifecycle stage.
Using smart blocks in HubSpot, you have the power to transfer this internal logic into your Analytics data to have more context in your Analytics reports and detect patterns in your visitor data.
This step-by-step guide will show how you can use the built-in contextual blocks to enrich your Analytics data.
We added this smart block in the header template to get the smart block loaded on every HubSpot page of the account.
Choose the internal logic you want to use, based on which smarter segments you need in Google Analytics.
This feature detects the visitor and matches his account using an existing HubSpot cookie in the visitor's browser.
Configure your HubSpot smart block and add the Datalayer-push code, basing the value on the Smart Rule.
window.dataLayer = window.dataLayer || ;
Check this blogpost from Simo Ahava about the push() method with GTM.
Remember the ID from the Custom Dimension you've created.
In Google Tag Manager, you'll have to create a new "Data Layer Variable" that will read the previously created HubSpot Data Layer.
Change your existing GTM Universal Analytics tag and match the Custom Dimension (remember the index number from step 4) with the previously created GTM variable.
HubSpot smart blocks will add the data layer code below your existing GTM snippet.
Because of this fact, you'll have to change the tag trigger in order to have it wait until the DOM is ready.
Using the GTM Preview mode, you can test the existence of the HubSpot data Layer and whether GTM is capturing this value.
Every company has its own goals and processes. The marketing technology landscape is becoming more and more complex with new tools popping up every week.
You'll get the most possible return from these tools if you combine data to get more context.