The Best Way To Implement Google Analytics on a Squarespace Site

The Best Way To Implement Google Analytics on a Squarespace Site

How to add Google Analytics to a Squarespace Website

Correctly implementing Google Analytics (or another web tracking tool) is critical for any website. However, there are always a few ways to do this. In this article HammaJack co-founder, Jacob Moran, outlines the two different ways to implement Google Analytics on a Squarespace website.

E-Commerce website or normal Squarespace website?

The first thing you need to do to implement Google Analytics on Squarespace is understand what kind of website you have - are you selling products on the site (E-Commerce) or is it a lead gathering/information website?

The reason for this is that Squarespace has some pretty strict rules about the checkout (E-Commerce) functionality on its sites. One of these rules is that you cannot inject code into the checkout pages of the site.

This may sound like a limitation, but it’s one of the many things that makes Squarespace so easy to use and unbreakable, and one of the many reasons I prefer it to more open CMs like WordPress. However, because of this rule and the fact that Google Analytics is usually inserted as a code snippet, you really only have a few options. These have been outlined below.

Two options to implement Google Analytics on to your website

Simple

Use this if: You want a set-and-forget tracking solution, and you want to rest assured that everything will work pretty well.

This solution works for: E-Commerce websites or basic websites where the standard reports will be enough.

This solution uses: Squarespace’s inbuilt Google Analytics integration. With this integration, you’ll be sent the basic pageview tracking and then, if required, the more advanced E-Commerce event tracking to your nominated Google Analytics account.

Why use the simple option with an E-Commerce Website

As you cannot inject code into the checkout on Squarespace, the simple option will suit most cases. 

Why use the simple option with an Information/Lead Website

If your digital platform isn’t a big concern, the simple option will suit your needs.

How to do it

To do this all you need to do is;

  • Go to your Google Analytics account and get your UA ID. This will look something like UA-XXXXXX-Y. 

  • Once you have this go into Squarespace and navigate to: Settings > Advanced > External API Keys

  • Enter in your ID and press Save


External API Keys Google Analytics Squarespace.png

Advanced

Use this if: You want more in-depth information about a site such as;

  • Scroll Tracking

  • Video Views

  • File Downloads

  • Form Submissions

  • Click Tracking

This solution works for: Digital-first E-Commerce websites or lead/information websites that want to know exactly how everything is performing.

This solution uses: The inbuilt Google Analytics integration (E-Commerce only) for basic pageview information, and E-Commerce events and Google Tag Manager for detailed on-page events.

Why use the advanced option with an E-Commerce Website

At HammaJack we love Google Tag Manager, and every one of our sites and customers gets a custom tracking solution that will invariably use Google Tag Manager at some point. However, that isn’t always needed for standard sites. 

We personally love the extra information you can capture thanks to GTM and find it invaluable - especially for our larger clients. This information, tied with the normal E-Commerce tracking, will help you to really understand the performance of your products at a micro-level. 

Why use the advanced option with an Information/Lead Website

If you spend a lot of time creating content on your site, you have a lot of different forms and/or you spend a lot on marketing, the standard reports won’t give you enough information about ROI and general performance.

How to do it

How you go about this depends on your site. Both websites should utilise the page/form code injector that Squarespace offers to send information to the DataLayer. We use it to track our blog's performance, but you will also need to use it to tell Google Tag Manager when things happen (like that a form was submitted). If you're not doing this, then you’ll be missing important pieces of the puzzle.

E-Commerce Website

To implement on an E-Commerce website you need to;

  • Implement Google Analytics Tracking (as per the Simple Instructions above)

  • Navigate to: Settings > Advanced > Code Injection

  • Insert your Google Tag Manager snippet in the header and footer 

  • In Google Tag Manager configure the desired tracking, but make sure to remove the pageview tracking tag and only use GTM to send the more detailed event tracking that you are after.

Code Injection Google Analytics.png



Information/Lead Website

To implement with a standard website you need to;

  • Navigate to: Settings > Advanced > Code Injection

  • Insert your Google Tag Manager snippet in the header and footer 

  • In Google Tag Manager configure the desired tracking, including a Google Analytics pageview tag

  • Publish your container

With this implementation, all your tracking is running through your Google Tag Manager account.



Most Important Point

When picking a tracking implementation for your website, be realistic about what you need and what you don’t. The simple level of tracking will suit most cases, however, if you’re a digital-first business you should look into using an advanced installation, as is the most beneficial and insightful for you.




Website Optimisation - HammaJack's Guide To SEO

Website Optimisation - HammaJack's Guide To SEO

How does the removal of Instagram likes affect your business?

How does the removal of Instagram likes affect your business?