Introduction:
Google Tag Manager
It’s just makes it easy to manage all of your scripts and tags from one place. LeadsHook has a one-step integration to GTM. Then all of your GTM containers are available to be ‘applied’ to any decision tree you want.
Further there are some extra benefits to using Google Tag Manager which is explained in this video:
LeadsHook provides an integration to Google Tag Manager.
Understanding LeadsHook Google Tag Manager Container & Tags
When you integrate Google Tag Manager, LeadsHook will add the following TAGS (and associated Variables and Triggers)…
A: Adwords conversion tracking on your Results Page. Simply update Conversion ID and Conversion Label…
LeadsHook will fire resultsPageReady event on a Results Page with an orderid.
The order id is LeadsHook system field, impression_id. You can see a UNIQUE impression_id saved against EVERY decision tree impression…
Confirm Google Conversion Tracking Is Firing…
B: For your decision tree embed. Your LeadHook embed sends a message to Parent to ask for client id issued by Google Analytics
C: Conversion Linker is a tag recommended by google for cross domain tracking. Feel free to use it if you have other domains tracked. You can add it if you want.
D: Facebook Base Pixel
E: Filter Hostname: Custom HTML Tag to filter the parent and LeadsHook domains before Google Analytics is fired
F: Linker Params: For autoLinker custom field in GA
G: Gets client id and sends to LeadsHook.
H: Google Analytics is setup to fire on once per event…
LeadsHook is a single page app. LeadsHook pages are dynamic so the URL does not change. LeadsHook fires a pageview on the change of each NODE.
Each NODE (start page, questions, forms and results page etc) is pushed as a page view into Google Analytics.
This can be viewed from the JS console in Chrome browser. (View > Developer > JS Console. Sources Tab.
You can see that from USER EXPLORER inside Google Analytics…
You’ll see LeadsHook decision trees interactions showing up as another page on your site.
And from GOALS overview…
How to Setup Goals in Google Analytics
Here’s the SETUP using DESTINATION.
NOTE: We’re using ‘REGULAR EXPRESSION’…
Please Note: Regular Express is the TITLE of YOUR RESULTS PAGE added WITHOUT SPACES in LOWER CASE.
How to Fire Events into GTM
You can add TAGs inside GTM and trigger those from LeadsHook by firing an event into GTM.
This will only work if GTM has been added to website.
How to Fire Events into Google Analytics
This will only work if you’ve added Google Analytics inside GTM first.
<script>
ga('send', {
hitType: 'event',
eventCategory: '{_c_dt}',
eventAction: '{_c_question}',
eventLabel: '{_c_answer}'
});
</script>
How to Troubleshoot Your Events – making sure events are firing.
HOW TO VIEW YOUR EVENTS INTO A FLOW
BUILD AUDIENCES USING EVENTS
Here’s the technical docs on events (not required but adding it for completeness): https://developers.google.com/analytics/devguides/collection/analyticsjs/events
Conclusion:
Successfully integrating LeadsHook with Google’s marketing and analytics tools offers a powerful way to track, analyze, and optimize your decision trees. It’s important to understand the functionality of these integrations and to set them up correctly for accurate data tracking.