Introduction:

This article will explain the Tracking and Analytics capability of LeadsHook.

We recommend and encourage the use of 3rd party tracking. Most users use Google Analytics. However we have users who use other tracking apps and software as well such as hotjar, mouseflow, Segment.io, AutoPilotHQ and many others.

As long as your tracking solution can track JS events you’ll be able to use it. If you’re unsure then please contact us with a link to the app.

TRACKING PRIMER
Most Tracking and CRM apps provide a tracking code (e.g. Facebook pixel or Google Analytics)
BASE TRACKING/PIXEL
In our training we refer to these as the BASE pixel or tracking code. These tracking codes will FIRE on every page and LeadsHook node, e.g. Facebook Pixel or Google Analytics
EVENTS
On each node, you can track multiple behaviours like a button clicked or form field filled or even speed at which a website visitor scrolls on a page. This is done using snippets of javascript events such as Facebook standard events.
These standard events NEED the base pixel to be loaded BEFOREHAND before these events will work. The events require the base pixel to work.

Our preferred and recommended way of tracking is via Google Tag Manager and Google Analytics.

Why 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:

Go to this article to learn how to integrate Google Tag Manager with LeadsHook.

Why Google Analytics?

  • Google has spent billions building a FREE analytics and tracking platform. It has all of the advanced features required to slice and dice the data.
  • Google Analytics also has the capability for viewing the data. Our preferred approach is using EVENTS FLOW. See below.
  • Google Analytics integrates with other Google products such as Google Ads and Google Optimize. It for this capability to push ‘goals’ and conversions into Google Ads is why we recommend users use Google Analytics.

Click: How to Directly Integrate Google Analytics

How to Trace and Audit Your Impressions & Leads

If you want to audit and trace your impressions and leads then please be sure to checkout the following system fields…

impression_id: Every time a Decision Tree is shown

lead_id: Every unique visitor

lead_token: Unique token generated for each lead

Click: How to Add 3rd Party Tracking and Analytics Scripts, Pixels and Events

Please see the above article to learn how to fire node level events for granular tracking & audience building. Please go to Node-Level Tracking.

How to Fire Google Analytcs Events

Add this script to node level.

<script>
ga('send', {
  hitType: 'event',
  eventCategory: 'DT:QualDT',
  eventAction: 'Qn:Telling a story about open-mindedness is a powerful strategy to get people to accept new ideas.',
  eventLabel: 'Ans:{ga_1}'
});
</script>


Notice:  {ga_1} is a custom field. Save your answers into a custom field and add that custom field to the event.

How to Track FaceBook Events

Similar to Google Events tracking as shown above, you can also pass Javascript Events to Facebook.

Facebook as 2 options…

Standard Events: For almost users, standard events are sufficient.

https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#standard-events

 

 

2. Custom Events

For custom events…

https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#custom-events


WHERE TO ADD THE EVENT SCRIPT:

“SECRET” CUSTOM FIELDS

LeadsHook has the following ‘secret’ custom fields so you don’t have to enter values manually each node.

LeadsHook will automatically replace the values of the CURRENT node into theses fields. And repeat on every node where these custom fields are used.

Warning! The values of these fields CHANGE as per the node so they should only be used for events such as when used in tracking scripts.

Current Decision Tree Title: {_c_dt}:
Current Node Title: {_c_node}
Question: {_c_question}
Answer: {_c_answer}

Google Analytics Example:

PLEASE ENSURE THE CODE YOU COPY/PASTE CONTAINS STRAIGHT QUOTES AND NOT CURLY QUOTES
‘straight quotes’
‘curly quotes’

curly quotes will give an error

TAKE NOTE, CURRENTLY THERE ARE TWO FORMATS FOR GOOGLE ANALYTICS. IT’S THE OLD 
ANALYTICS.JS AND THE NEWER GTAG.JS VERSION. 

IF YOU ARE USING GOOGLE ANALYTICS DIRECTLY ON YOUR DECISION TREE, THEN YOU NEED TO USE THE GTAG VERSION, HOWEVER IF YOU ARE FIRING GOOGLE ANALYTICS VIA GTM, THEN YOU NEED TO USE ANALYTICS.JS VERSION AS OUR GTM CONTAINER IS USING ANALYTICS.JS.
Gtag.js Version

<script>
gtag('event', '{_c_question}', {
  'event_category': '{_c_dt}',
  'event_label': '{_c_answer}'
});
</script>
Analytics.js Version

<script>
ga('send', {
   hitType: 'event',
   eventCategory: '{_c_dt}',
   eventAction: '{_c_question}',
   eventLabel: '{_c_answer}'
});
</script>

Facebook Standard Event

<script>
fbq('track', 'ViewContent', {
  content_name: '{_c_dt}',
  content_category: '{_c_node}',
  content_ids: ['{_c_question}'],
  content_type: '{_c_answer}'
 });
</script>

You can also use the lead event when you’re captured a LEAD.

<script>
fbq('track', 'Lead', {
  content_name: '{_c_dt}',
  content_category: '{_c_node}',
  value: 0.50,
  currency: 'USD'
 });
</script>

Please SEE below for details on how to push custom fields INTO JS events.

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:

LeadsHook provides extensive tracking and analytic capabilities to help you maximize the effectiveness of your decision trees. By integrating with Google Analytics and Google Tag Manager, you can gain deeper insight into your decision trees’ performance and optimize them accordingly.

FAQs:

  • Can I integrate LeadsHook with tracking software other than Google Analytics?
    • Yes, as long as your tracking solution can track JS events, you can use it with LeadsHook.

Leave a Reply

Your email address will not be published. Required fields are marked *