Skip to content

Instantly share code, notes, and snippets.

@thedavidmeister
Created December 9, 2016 06:03
Show Gist options
  • Save thedavidmeister/9d48d362d5b1aa64b90b62958a2dfae1 to your computer and use it in GitHub Desktop.
Save thedavidmeister/9d48d362d5b1aa64b90b62958a2dfae1 to your computer and use it in GitHub Desktop.
Heap analytics snippet sans HTML tags, load call and DOM manipulation
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};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])};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment