The SessionStack Developer Hub

Welcome to the SessionStack developer hub. You'll find comprehensive guides and documentation to help you start working with SessionStack as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Google Tag Manager

Google Tag Managers allows you to integrate tools in your web apps with just a few clicks, without having to modify its code and re-deploy it.

The first thing you need to do is go to the Installation view in your project and copy the code snippet that has been generated. See Getting Started to see how to get there.

The code snippet looks 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 -->

The, go to your container in GTM and click on "New Tag":

Then, when you select the type of tag you want, you have to click "Custom HTML":

In the Tag Configuration, you have to place the code snippet from your project:

This basically tells GTM what code to insert into your page. You need to select a trigger for that tag. Click on the "Triggering" section and select "All Pages":

And that's it. You can click "Save" and name your tag. When you're ready, you have to release the changes from your container:

Now, when you're web app is loaded, the SessionStack script will be inserted through GTM.

Updated 2 years ago


What's Next

Dev Environment

Google Tag Manager


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.