Tagged: analytics code, child theme, enfold, header.php
-
AuthorPosts
-
November 13, 2017 at 3:13 am #875909
Hi Guys,
New to the field of website development … and I’m loving Enfold so far.
I would like to install HEAP ANALYTICS to my site to track customer/visitor behavior within the site. Below is the code Heap asks to be added before the closing </head> tag on each page. I am using Enfold Child theme of course and I am not sure what would be the best way to do this.
<script type=”text/javascript”>
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(“4152963803”);
</script>Your urgent reply would be so much appreciate it.
Thanks,
– ZNovember 13, 2017 at 12:24 pm #876080Hey ZeyadElbaser,
You should be able to add that to the Analytics option under Enfold->Google Services. Please try that out, if you should have any problems then please post a link to the site in question so that we can have a closer look.
Best regards,
RikardNovember 13, 2017 at 3:35 pm #876138Hi Rikard,
But this is not a Google service. I have already installed and added my google tracking code. The code above, is for Heap Analytics, which is another service altogether. Not sure if I am making sense :/November 14, 2017 at 6:31 am #876452Hi,
It doesn’t really matter if it’s not a Google tracking code, it goes in the same place anyway. Could you try it out first to see if works?
Best regards,
RikardNovember 14, 2017 at 8:01 am #876485It is installed but it cannot load the “Event Visualizer”. My browser is NOT blocking 3rd party cookies.
November 15, 2017 at 12:06 am #876870Rikard?
November 15, 2017 at 6:42 am #876935Hi,
Ok, thanks for that. Though I have no idea what the Event Visualizer is?
Best regards,
RikardNovember 15, 2017 at 6:45 am #876938Their Event Visualizer is basically their on site editor. You can view and add events to track on any elements I have on my website page. Like a layer covering my page.
November 16, 2017 at 1:30 pm #877506Hi,
Ok, thanks for the info. I’m not sure we can help you out with that though, could you try contacting the developers of code to see if they can see why it’s not working please? Also note that our theme cannot be compatible with all third party code out there unfortunately.
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.