Script Tag

You can integrate SessionStack in your project by directly placing the generated script tag in your project.

The snippet for your project will look something like this:

<!-- Begin SessionStack code -->
<script type="text/javascript">
!function(a,b){var c=window;c.SessionStackKey=a,c[a]=c[a]||{t:b,
q:[]};for(var d=["start","stop","identify","getSessionId","log"],e=0;e<d.length;e++)!function(b){
c[a][b]=c[a][b]||function(){c[a].q.push([b].concat([].slice.call(arguments,0)));
}}(d[e]);var f=document.createElement("script");f.async=1,f.src="https://cdn.sessionstack.com/sessionstack.js";
var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(f,g);
}("SessionStack","<project_token>");
</script>
<!-- End SessionStack Code -->

In order to get this script, you need to navigate to your project and go to the "Installation" view:

This is a script stub that we have generated for you. You have to place this code, preferably, in the section of your web app.

Note that, in your project, instead of seeing <project_token> you will see a string, similar to this one: "a30685a8045148358b310b6b2578btff". This identifies your project.


What’s Next