Notification

The Google Analytics: GA4 Configuration tag is now the Google tag. GA4 Configuration tags in a web container will be automatically migrated starting in September. There are no changes to your existing measurement and there is no action required from you. Learn more

Squarespace: Set up your Google tag

You can measure behavioural data about your site with Google Analytics and Google Ads. Follow the steps in this article to set up your Google Analytics and Google Ads accounts with Squarespace.

Before you start

You’ll need to have your Google tag ID.

The instructions for setting up the Google tag with Squarespace are different for tag IDs starting with 'AW-' (usually, Google Ads accounts) and tag IDs starting with 'G-' (usually, Google Analytics properties).

If you have a tag starting with 'AW-'

If you’d like to set up your Google tag using this method, a Squarespace Business or Commerce subscription is required. Learn more about Squarespace pricing.
  1. Sign in to your Squarespace account.
  2. On the 'Dashboard', choose the site that you want to modify.
  3. From the main menu, click Settings.
  4. Click Developer tools.
  5. Click Code Injection.
  6. Under 'Header', paste your Google tag and click Save.

    <!-- Google tag (gtag.js) -->

    <script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>

    <script>

     window.dataLayer = window.dataLayer || [];

     function gtag(){dataLayer.push(arguments);}

     gtag('js', new Date());

     gtag('config', 'TAG_ID');

    </script>

Note: Don’t add more than one Google tag to each page of your website.

If you have a tag starting with 'G-'

  1. Click the copy icon to copy your tag ID.
  2. Sign in to your Squarespace account.
  3. On the 'Dashboard', choose the site you want to modify.
  4. From the main menu, click Settings.
  5. Click Developer tools.
  6. Select External API Keys. An animated GIF demonstrating how to navigate to External API Keys in Squarespace.
  7. Paste your tag ID. An animated GIF demonstrating how to add your Google Analytics code to Squarespace.
  8. Click Save.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
17599404115810402259
true
Search Help Centre
true
true
true
true
true
102259
false
false