GoSquared Setup and Implementation | Blue Frog Docs

GoSquared Setup and Implementation

Complete guide to setting up GoSquared analytics.

Implementation Overview

GoSquared provides real-time web analytics, customer data platform, and live chat capabilities. This comprehensive guide will help you implement GoSquared across your digital properties for visitor tracking, user engagement, and behavioral analytics.

 


 

Prerequisites

Before implementing GoSquared, ensure you have:

  • GoSquared Account: Active account with project created
  • Project Token: Your unique tracking identifier (format: GSN-XXXXXX-X)
  • Website Access: Ability to modify HTML or deploy via tag manager
  • Development Environment: For testing implementation before production

 


 

Quick Start

1. Create Account

  1. Sign up at gosquared.com
  2. Complete email verification
  3. Create your first project
  4. Note your project token from Settings → Tracking

2. Add Tracking Code

Add the tracking snippet before the closing </body> 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('GSN-XXXXXX-X');  // Replace with your project token
</script>

3. Verify Installation

  1. Visit your website with the tracking code installed
  2. Open GoSquared dashboard → Now tab
  3. Verify your visit appears in real-time
  4. Check browser console for errors

 


 

Implementation Methods

Standard JavaScript Tag

Best for most websites:

<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');
  _gs('set', 'anonymizeIP', true);  // Optional: GDPR compliance
</script>

Google Tag Manager

  1. Create new Custom HTML tag
  2. Paste GoSquared tracking code
  3. Set trigger to "All Pages"
  4. Publish container

NPM Package

For modern JavaScript frameworks:

npm install gosquared
import GoSquared from 'gosquared';

GoSquared.load('GSN-123456-A');
GoSquared.trackEvent('Page View');

 


 

Configuration Options

Basic Configuration

_gs('GSN-123456-A');
_gs('set', 'anonymizeIP', true);
_gs('set', 'cookieDomain', '.example.com');
_gs('set', 'useCookies', true);

Available Settings

Setting Type Description Default
anonymizeIP boolean Anonymize visitor IP addresses false
cookieDomain string Cookie domain scope Current domain
useCookies boolean Enable cookie tracking true
trackLocal boolean Track localhost traffic false
trackHash boolean Track hash changes as pageviews false

 


 

Testing Your Implementation

Browser Console Verification

Check that the global _gs object exists:

console.log(typeof _gs); // Should output "function"
console.log(_gs.q); // Should show queued commands

Network Tab Verification

  1. Open browser DevTools → Network tab
  2. Filter for "gosquared"
  3. Verify requests to d1l6p2sc9645hc.cloudfront.net
  4. Check 200 response status

Real-Time Dashboard

Monitor the Now tab in GoSquared dashboard for live visitor data.

 


 

Common Implementation Issues

Issue Cause Solution
No data appearing Incorrect token Verify project token in Settings
Duplicate tracking Multiple installations Remove duplicate tracking codes
CORS errors Mixed content Ensure HTTPS on all pages
Ad blocker interference Privacy extensions Test in incognito mode
Slow page load Blocking script Use async loading method

 


 

Next Steps

After basic installation, configure advanced features:

 


 

Best Practices

  1. Test in Development: Verify tracking before production deployment
  2. Use Environment Variables: Store project tokens securely
  3. Monitor Performance: Check page load impact with tracking
  4. Document Custom Events: Maintain event naming conventions
  5. Regular Audits: Verify tracking continues to work after site updates
// SYS.FOOTER