Integrating with Heap Analytics

image of the heap logo

Heap automatically captures every user interaction with no extra code. This includes clicks, taps, gestures, form submissions, page views, and more.

You can set it up to track your Instapage landing pages through a simple process, by following the steps below.

     1. When creating your Heap Analytics account, you received a tracking script to add to all your pages. It should look something like this: 


<script type="text/javascript">// <![CDATA[
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])};
   heap.load("YOUR_APP_ID");
// ]]>
</script>

 

In the script above, you just have to replace YOUR_APP_ID with the ID from the environment you wish to send data to. You can get the environment ID from the Heap Analytics dashboard, by clicking on Settings, Projects.

image of heap sample tracking script

  1. Paste the amended tracking code on your Instapage landing page/s, in Settings, HTML/CSS, in the Header Section, then save and update your live page with the latest changes.

image of app ID and how to replace it in the code snippet

  1. Go back to the Heap Analytics dashboard, add the page’s URL, and click on Launch.

image of adding the page URL in the Heap Analytics dashboard

  1. Make sure you’re in Definition mode, and start creating your events. If you’re not sure on how to proceed further, check out the Getting Started Videos section from the Heap Docs that will get you up to speed with Heap's features and how to use them.

image of Heap definition mode option

And that’s it. Now you will be able to understand your visitors behaviour based on the metrics you chose to track with Heap Analytics.

Note: While we try to keep all of our instructional articles that involve third-party services up to date, sometimes they make changes to their platform of which we are not aware and, as a consequence, the user interface may differ from the provided screenshots.