Installation
Getting started with GoSquared is as simple as adding a small JavaScript snippet to your site. This code snippet powers Analytics and optionally loads the live chat Assistant. Just copy and paste it into every page you'd like to track, just before the closing </head>
tag.
You will need to replace the GSN-123456-A
parameter with the token of the project you wish to track. You can find the token, along with this tracking snippet, by going to the setup guide.
The tracking code will load asynchronously and automatically track a pageview. If you'd like to change this default behaviour, and manage tracking pages manually then see Track Pageviews.
Note: this code will only load the GoSquared Assistant if you have Assistant turned ON in Settings > Current Project > Assistant.
The GoSquared Analytics code should be installed on every page of your site, just before the </head> tag.
<script>
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(arguments)};
d=s.createElement(q);d.src='//d1l6p2sc9645hc.cloudfront.net/gosquared.js';q=
s.getElementsByTagName(q)[0];q.parentNode.insertBefore(d,q)}(window,document
,'script','_gs');
_gs('your-project-token');
</script>
Remember to substitute your project token into this code.
Full Example Page
<!DOCTYPE html>
<html>
<head>
<title>This is my website</title>
<!-- GoSquared Analytics Code -->
<script>
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(arguments)};
d=s.createElement(q);d.src='//d1l6p2sc9645hc.cloudfront.net/gosquared.js';q=
s.getElementsByTagName(q)[0];q.parentNode.insertBefore(d,q)}(window,document
,'script','_gs');
_gs('GSN-123456-A');
</script>
<!-- End GoSquared Analytics Code -->
</head>
<body>
The rest of my website is here
</body>
</html>