Skip to content

Instantly share code, notes, and snippets.

@wetzler
Last active April 19, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wetzler/8f7b574c1473e5c89d6c69636617eb7d to your computer and use it in GitHub Desktop.
Save wetzler/8f7b574c1473e5c89d6c69636617eb7d to your computer and use it in GitHub Desktop.
Keen IO Auto-Collection for Web
<script type="text/javascript">
function createKeenWebAutoCollector(){window.keenWebAutoCollector=window.KeenWebAutoCollector.create({projectId:'<YOUR_PROJECT_ID>',writeKey:'<YOUR_WRITE_KEY',onloadCallbacks:window.keenWebAutoCollector.onloadCallbacks}),window.keenWebAutoCollector.loaded()}function initKeenWebAutoCollector(){window.keenWebAutoCollector.domReady()?window.createKeenWebAutoCollector():document.addEventListener("readystatechange",function(){window.keenWebAutoCollector.domReady()&&window.createKeenWebAutoCollector()})}window.keenWebAutoCollector={onloadCallbacks:[],onload:function(a){this.onloadCallbacks.push(a)},domReady:function(){return["ready","complete"].indexOf(document.readyState)>-1}};
</script>
<script async type="text/javascript" src="https://d26b395fwzu5fz.cloudfront.net/keen-web-autocollector-1.0.8.min.js" onload="initKeenWebAutoCollector()"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment