Heap
Heap is a web analytics platform that automatically captures user interactions on websites without requiring manual event configuration.
Key features include:
- Automatic tracking of page views and interactions
- Behaviour and event analytics
- Funnel and path analysis
- User identification and segmentation
- Data visualisation and reporting
Heap integrates with ShopWired by adding a to the website theme to collect visitor interaction data across the site.
Account creation
Account creation
Create an account on the Heap website at Heap. After your account is created and configured Heap will provide the JavaScript snippet required for installation.
Theme installation
Theme installation
Heap tracking is added site-wide by placing the JavaScript snippet, similar to the example shown below:
<script type="text/javascript">
window.heapReadyCb=window.heapReadyCb||[],window.heap=window.heap||[],heap.load=function(e,t){window.heap.envId=e,window.heap.clientConfig=t=t||{},window.heap.clientConfig.shouldFetchServerConfig=!1;var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://cdn.us.heap-api.com/config/"+e+"/heap_config.js";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(a,r);var n=["init","startTracking","stopTracking","track","resetIdentity","identify","identifyHashed","getSessionId","getUserId","getIdentity","addUserProperties","addEventProperties","removeEventProperty","clearEventProperties","addAccountProperties","addAdapter","addTransformer","addTransformerFn","onReady","addPageviewProperties","removePageviewProperty","clearPageviewProperties","trackPageview"],i=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);window.heapReadyCb.push({name:e,fn:function(){heap[e]&&heap[e].apply(heap,t)}})}};for(var p=0;p<n.length;p++)heap[n[p]]=i(n[p])};
heap.load("YOUR_APP_ID");
</script>
The script shown above is provided as an example only. You must copy the exact script provided in your own account, as the script and any ID values will be unique to your website.
Add the script to your ShopWired theme:
- Navigate to Website > Themes!
- Select the
code editoroption for the active theme. - Open the
master.twigfile. - Paste the Heap JavaScript snippet just above the closing
</head>tag. - Select
save changes.
Once installed, Heap begins collecting interaction data automatically across all pages.
Recommendations
Recommendations
- Ensure the tracking snippet is added only once to avoid duplicate data collection.