Websites by Elise

View Original

Adding Google Analytics To Squarespace [Easy Instructions]

Google Analytics is a free website analytics platform that allows you to see data on how well your website is performing. It’s real-time reports, performance insights, organization tools and ease of integration has deemed it the ultimate dashboard for website owners. It’s certainly the most robust (and popular!) platform for web analytics, with an average of almost 30 million website users.

Connecting your website with Google Analytics is a great way to see your audience’s demographics, discover patterns and trends in user engagement, and track your website’s conversion rates. Yes, Squarespace has built-in analytics, but it’s pretty basic. Google gives you wayyyy more data to work with. For example, in the Google Analytics dashboard you can see number of users, bounce rates, average session durations, audience location, page views, social media traffic and more. So if you’re serious about monitoring your website’s progress and collecting visitor data, I would take a moment to follow the steps outlined in this article and connect your Squarespace website to Google Analytics.


*This post contains affiliate links. I earn a small commission when you click on the links and make a purchase. This comes at no additional cost to you. Affiliate links are marked with an asterisk.


UA vs GA4

Universal Analytics (UA) is the earlier version of Google Analytics. For a long time, this was the standard way to implement Google Analytics on websites. The format for a UA Tracking ID looks like this: UA-XXXXXX-Y.

Google Analytics 4 (GA4) is the next generation of Google Analytics (announced in October 2020). It offers a more comprehensive and advanced set of features. Google will soon treat GA4 as the default tracking experience for all websites and apps. The format for a GA4 Measurement ID looks like this: G-XXXXXXXXXX.

Does Squarespace work with Google Analytics 4 (GA4)?

Yes! Squarespace works with GA4. In fact, starting July 1, 2023, you must use GA4. After that, the earlier version of Analytics (UA) will stop processing hits. Google recommends migrating to Google Analytics 4 before that date to avoid any loss of data.

Do I need to use UA or GA4?

If your website is brand new or you’ve never connected Google Analytics to it, you’ll only need to connect GA4.

If your website is already connected with UA, you’ll simply need to add the new GA4 Measurement ID, next to the existing UA Tracking ID in Squarespace.

How to Add Google Analytics to Squarespace

*If your website is already using UA, follow the steps in the next section instead.

  1. Create a free Google Analytics account (or simply login if you already have an account)

  2. Then, find your Google Analytics Measurement ID by following these steps:

    1. In the Google Analytics panel, click on Admin (bottom left)

    2.  Create a new Google Analytics 4 property for your website if you haven’t already. Detailed instructions from Google here (under “Create a new Google Analytics 4 property”).

      1. Click the CREATE button (top left)

      2. Choose Property

      3. Fill out your Property Name (name of your business), timezone, currency, etc… and click Next

      4. Choose the industry and size of your business and click Next

      5. Choose your business objectives and click Create

      6. Choose Web as the platform

      7. Then enter your website URL and name and click Create Stream

      8. On the next screen, you should be presented with a MEASUREMENT ID. If so, continue to step 3 below (Open the Advanced Panel…) to add your MEASUREMENT ID to Squarespace. If you don’t see your MEASUREMENT ID, follow the 3 steps below to find it.

        1. On the main Admin page, look for Data streams under Data collection and modification

        2. Then, click on the right facing arrow next to your website’s URL

        3. Under Stream details, you’ll see MEASUREMENT ID (G-XXXXXXXXXX). Copy your MEASUREMENT ID to your clipboard

  3. Open the Advanced Panel in Squarespace by going to Settings > Developer Tools > External API Keys

  4. Click External API Keys

  5. In the Google Analytics account number field, enter your Measurement ID (G-XXXXXXXXXX). Remember to include the entire ID, including G- at the beginning.

  6. Click Save

See this content in the original post

If Your Website is Already Using UA

  1. Find your Google Analytics Measurement ID by following these steps:

    1. In the Google Analytics panel, click on Admin

    2. Under the Property column, click on GA4 Setup Assistant

    3. Follow the on-screen prompts (this will create a new GA4 property for you)

    4. Click on See Your GA4 Property or Open Connected Property

    5. Click on Data Streams

      1. Note: If you are not seeing a Data Streams option, you might need to click on All Accounts at the top of the screen, then under Properties & Apps select your new GA4 Property. Then look for the Data Streams option under the Property column

    6. Then, click on the right facing arrow next to your website’s URL

    7. Under Stream details, you’ll see MEASUREMENT ID (G-XXXXXXXXXX). Copy your MEASUREMENT ID to your clipboard

  2. Open the Advanced Panel in Squarespace by going to Settings > Advanced

  3. Click External API Keys

  4. In the Google Analytics account number field, add your GA4 Measurement ID BEFORE your UA Tracking ID, separated by a comma. This is what the format should look like: G-XXXXXXXXXX, UA-XXXXXX-Y. Remember to include the entire ID, including G- at the beginning.

  5. Click Save

What’s Next?

It may take up to 24 hours for site statistics to populate in Google Analytics. To check if your website is properly connected, open up your website URL in your browser. Then, in a different tab, open up Google Analytics and open up your Realtime Report. If you can see your current activity, then your website is fully connected! 🎉


Did you enjoy this article? Check out more articles like this in the Squarespace Blog. In the blog, I share tips for hiring Squarespace Designers (or becoming one!), custom CSS and Javascript solutions, latest Squarespace news and updates, my favorite plugins, Squarespace Template Shops, and more!


Browse Premium Squarespace Templates

My modern, service-based templates are designed for entrepreneurs and small businesses who are looking for a professional website design without breaking the bank. Each one of my templates include video tutorials for easy content upload / style tweaks. I also include my Advanced SEO Guide (a $500 value). This guide contains the exact techniques I use to help my SEO clients land on Google page 1.


More from the Squarespace Design blog

See this content in the original post