Note: While our most popular guides have been translated into Spanish, some guides are only available in English.

Using Google Analytics with Squarespace

Use our built-in integration to connect your site to Google Analytics for visitor tracking and other reporting. To start, you'll need a Google Analytics account. You can sign up here.

Note: This is a built-in integration with Google Analytics. If you use this option, you don't need to add separate script code.

Add your Google Analytics tracking ID

To connect Google Analytics to your site, you need a Universal Analytics tracking ID. See Google's documentation for more information about generating and locating this tracking ID. At this time, Squarespace sites aren't compatible with Google Analytics 4 properties.

To add your Google Analytics tracking ID to your site:

  1. In the Home menu, click Settings, and then click Advanced.
  2. Click External API keys.
  3. In the Google Analytics account number field, enter your tracking ID for this site.
  4. Click Save.

It may take up to 24 hours for site statistics to populate in Google Analytics.

Hide your activity

Every time you preview a page when you're logged in, Google Analytics registers it as a pageview. If you don't want data from your visits mixed in with data from visitors, you can create a filter in Google Analytics to exclude your IP address. For help finding your IP address, see Google's documentation.

Conversion tracking

If you're using Google Analytics to track conversions for your eCommerce store, Squarespace sends the following information to Google Analytics for every received order:

  • Order ID
  • Your store name
  • Purchase total (includes shipping)
  • Customer's city, region, and country
  • Product name
  • SKU

For more help, visit Google's documentation.

Disconnect Google Analytics

To disconnect Google Analytics:

  1. In the Home menu, click Settings, and then click Advanced.
  2. Click External API keys.
  3. In the Google Analytics account number field, delete your tracking ID.
  4. Click Save.

Differences between Squarespace and Google Analytics

There are always variations between any two analytics platforms based on how each platform is built to calculate results.

Counting internal traffic when logged in

Squarespace doesn’t count internal traffic when you’re logged in. Google Analytics does, but you can set up a filter to exclude certain IP addresses.

Filtering bots and non-human activity

Squarespace and Google Analytics have different measures for filtering non-human traffic like crawlers and bots.

Rounding numbers based on sample data

In Squarespace, numbers are always calculated from your full visitor activity, no matter your audience size. In Google Analytics, some numbers may be estimates based on a sample of visitors. Learn more in Google’s documentation.

Tracking Commerce conversion

Some Squarespace users who track sales in both platforms have reported that Google Analytics occasionally misses some orders.

Attributing traffic to a source

In Traffic sources, we identify a referrer based on a visitor’s last click. Google has a similar tracking method with some exceptions. As a result of these differences, direct traffic numbers in Squarespace analytics might be greater than what you’ll see in Google Analytics.

Note: In Google Analytics, you might see traffic coming from a URL ending in /?sqsscreenshot=true, which you can disregard. The traffic comes from a tool that creates the site's screenshot in your Account Dashboard.

Recording location data

In Geography, we identify visitors by location. Google has a similar tracking method, but due to differences in the way each service records IP addresses, you may see discrepancies between locations on Squarespace analytics and Google Analytics.

Ajax loading and Google Analytics

If you have a version 7.0 site and your template uses Ajax loading, Google Analytics won't register all of your site traffic. Ajax interferes with site analytics, only logging the first page a visitor lands on. As the visitor then navigates around your site, Analytics won't record their traffic unless they refresh the page. To avoid this issue, disable Ajax loading for your site.

Was this article helpful?
1022 out of 1249 found this helpful
Using Google Analytics with Squarespace