With Google Analytics on your website, you’ll be able to answer questions like:

  • Which channel (social, SEO, ads, etc) is generating the most traffic?
  • What content is attracting the most customers?
  • Which marketing campaigns are the most or least successful?
  • How many of your visitors are browsing using mobile vs desktop?

If you don’t even have a Google Analytics account yet, the whole process will take you about 15 minutes from start to finish.

Important: this process requires you to have Google Tag Manager installed on your site—this is the tool we recommend you use to install and manage all of your tracking codes, including Google Analytics. If you haven’t done this, here’s a guide on how to install Google Tag Manager on a Squarespace site.

Sidenote: if you’re not using Squarespace, check out our guides on how to add Google Analytics to WordPress or Shopify.

Let’s get started.

If you want to save this tutorial for later, you can download a copy through the form below.

Get This Entire Walkthrough and All the Resources in This Post

Getting the Universal Analytics Tracking ID

The first step is to grab your tracking ID from your Google Analytics account.

Log into your Google Analytics account for this website, click “Admin” on the sidebar, and then click “Tracking Code” under the “Property” column.

(If you don’t have a Google Analytics account for this website yet, sign up for Google Analytics and set up your account.)

Take note of your Google Analytics tracking ID—the one that starts with “UA-”. You will need it for the next steps.

Installing Google Analytics on your Squarespace site

Now it's time to add your Google Analytics code to your Squarespace site using Google Tag Manager.

Sign in to your Google Tag Manager account (if you haven’t installed Google Tag Manager on your Squarespace site, check out this tutorial), select the container that is set up on your Squarespace website and go to “Tags”.

Click on “New” to create a new tag. It is recommended that it contains a mention to Google Analytics, it makes it easier in the future to locate the tags you are looking for. For example, we named it “GA_TrackingCode”.

Click on the “Tag Configuration” section and select “Universal Analytics”.

You’re now going to create a “Variable” where we are going to store the Google Analytics Tracking ID.

Click on the “Google Analytics Settings” drop-down, and select “New Variable…”

First, copy the Google Analytics Tracking ID (that you took note of in the previous step).

Next, rename the variable by clicking on the text on top. (you will want to give it a name that easily identifies what this variable is – e.g. “GA Tracking ID”)

Finally, hit “Save”.

You will be taken back to the previous menu.

Now you will want to set up a “Trigger” for this “Tag”. To do that, click on the “Triggering” section, and once the new menu opens click “All pages”.

You are now ready to save your settings by clicking on “Save”.

If you now click on “Overview” on the sidebar, this is how your Google Tag Manager overview dashboard should look like.

If everything looks ok, you are now ready to hit “Submit”.

In the Submission Configuration panel, you will be given the chance to add a name and description to this version. After you have done so, hit “Publish”.

And that’s it! You should be all set—now let’s make sure everything is working properly.

Testing your Google Analytics installation

Lastly, let's make sure everything is working properly.

To test, you’ll need to install the Google Tag Assistant Extension on Google Chrome.

Once you’ve done that, open your website and click on the Google Tag Assistant icon. 

Click on “Enable”.

Refresh the page and click on the Google Tag Assistant Chrome Extension again.

You should be able to see a Tag named “Google Analytics” and your Analytics Tracking ID beneath it.

This means your installation was successful!

Bonus: Setting up views in your Google Analytics account

Set up your Google Analytics account like a pro.

Most people set up just one view for their Google Analytics account—it’s usually the one named “All Web Site Data”.

In Google Analytics, a “View” is like a lens through which you see all your data. For example, you could apply certain filters to a view—like a view for analyzing only existing customers, or a view for excluding traffic from your own team from your reports.

Having a single view is alright if you are 100% certain that you won’t be implementing any customizations on your Google Analytics properties. However, we recommend that you create 3 views:

  • Main View: This is your go-to view. This is where you will be doing all your analysis. All customizations to Google Analytics should have already been properly tested in the Staging View as not to affect this view’s data.
  • Staging View: Think of this view as your sandbox. If you want to test something new but are unsure how it will affect your data (e.g: creating a new filter) you will want to do it here and give it a few days before migrating the changes to the Master View.
  • Unfiltered View: This view will be left untouched no matter what. No customizations whatsoever will be done to this view.

With this structure, you will always have a way to recover lost data in case something goes wrong. The Unfiltered View will always have all your data. And the Main View will have all your filters applied without errors.

To set up these views, go to your Google Analytics Admin page. Under “View” click on “Create View”

Insert the view details as shown below and create your “Unfiltered View”. We’re now going to create the Staging View. To do that, select the “All Web Site Data” from the dropdown. And click on “View Settings”. Click “Copy View”. In the “New view name” field, type “Staging View”, and click “Copy View”: You should now have these 3 views.

Finally, rename the original “All Website Data” view and we’ll be done.

To do it, select the “All Web Site Data” view, click on “View Settings”, and rename it to “Main View”.

You should now be able to see your three views:

That’s it!

If you’ve been following along, you’ve now installed Google Analytics on your Squarespace site, made sure the installation was done correctly, and set up your Google Analytics view like a pro.

Double Conversions With Laser-Focused Google Analytics

Get the 2020 Ultimate Guide to Perfect Google Analytics Tracking sent to your inbox.

Share
Tweet
Share