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 events you’ll be able to use it. If you’re unsure then please contact us with a link to the app.

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:

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

Facebook Standard Event

<script>
fbq('track', 'ViewContent', {
  content_name: 'LeadsHookDecisionTree',
  content_category: 'TypeOfBiz',
  content_ids: ['TypeOfBiz'],
  content_type: '{dm_biztype}',
 });
</script>

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

<script>
fbq('track', 'Lead', {
  content_name: 'QuizName',
  content_category: 'LeadsHookQuiz',
  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

Leave a Reply

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