integrationsjs

<script>
  (function(){
    var integrations=window.integrations=window.integrations||[];if(integrations.loaded){return}if(integrations.invoked){return}integrations.invoked=true;integrations.methods=["identify","setContext","set","get","do"];integrations.factory=function(method){return function(){var args=Array.prototype.slice.call(arguments);args.unshift(method);integrations.push(args);return integrations}};for(var i=0;i<integrations.methods.length;i++){var key=integrations.methods[i];integrations[key]=integrations.factory(key)}integrations.load=function(siteId){integrations.siteId=siteId;var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src="https://cdn.integrationsjs.com/dist/boot.js";var first=document.getElementsByTagName("script")[0];first.parentNode.insertBefore(script,first)};

    // Load Integrations.js with your API key
    integrations.load('pk_fc0d68c54c46373064a01dbd6cd0bad6');

    // Identify the user by their unique ID
    integrations.identify({
      userId: 'UNIQUE ID FOR USER' // email/username/userid
    });

    // Call setContext whenever the context of the page changes
    // This can be called any number of times
    integrations.setContext({
      title: 'So many integrations, so little time',
      description: 'Take a look at integrationsjs.com',
      datasets: {
        foo: [['name', 'age'], ['jason', 29]]
      }
    });
  })();
</script>