How to install - activitystream/asa.js GitHub Wiki

To start collecting analytic information from your web site in Activity Stream all you need to do is to place the following piece of javascript somewhere between the <head> and </head> tags.

Please do not forget to replace the #your Tenant ID# with your Tenant ID.

<script>
(function(i,s,o,g,r,a,m){i['ActivitystreamAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//cdn.activitystream.com/asa.min.js','asa');

asa('tenant.id.provided', '#your Tenant ID#');
</script>

This snippet loads the main Activity Stream analytics script in a way that does not affect your end users' experience and sends a pageview event.

To see how to send an event using JavaScript click here

⚠️ **GitHub.com Fallback** ⚠️