Squarespace

Squarespace Tracking Guide: GA4, GTM and Conversion Pixels in 2026

8 min read··By the TrackingCoder team

Squarespace is the second most popular drag-and-drop website builder after Wix, but it handles tracking very differently. Where Wix has its own quirks around custom code restrictions, Squarespace is more flexible - but only on paid plans, and only in specific ways. This guide covers exactly how to install Google Tag Manager, GA4, and conversion pixels on a Squarespace site, plus the limitations you need to understand before relying on it for ad campaigns.

Which Squarespace Plans Allow Custom Code?

Squarespace's policy is simpler than Wix's: custom code injection is only available on the Business plan or higher. The Personal plan does not support code injection, which means you cannot install Google Tag Manager on it.

PlanCustom Code?GTM Possible?
PersonalNoNo
BusinessYes (header/footer only)Yes (head only)
Commerce BasicYesYes
Commerce AdvancedYesYes

Squarespace also has its own native Google Analytics integration on Personal plans, but it's the old "Universal Analytics" style and doesn't support GA4. If you need real GA4 tracking, you need the Business plan minimum.

Step 1: Install Google Tag Manager

Get your GTM snippets from tagmanager.google.com. You'll have two: a head snippet and a body snippet.

Important Squarespace limitation: Squarespace only lets you inject code in the page <head> and <footer>, not right after the opening <body> tag. This means the noscript fallback portion of the GTM body snippet won't work - but the main GTM tag (in the head) will work fine. The noscript fallback only matters for users with JavaScript disabled, which is well under 1% of traffic.

  1. In your Squarespace dashboard, go to Settings
  2. Click Advanced
  3. Click Code Injection
  4. Paste the GTM <head> snippet into the Header text area
  5. Click Save

That's it. GTM is now installed on every page of your Squarespace site.

Step 2: Add GA4 Inside Your GTM Container

Inside GTM, create a new tag of type Google Tag, paste your GA4 Measurement ID (it starts with G-), and set the trigger to All Pages. Save and publish your container. GA4 will start receiving pageviews within minutes.

One thing to know about Squarespace: it uses some client-side rendering for navigation, which can cause GA4 to occasionally miss pageviews when users navigate between pages without a full page reload. To handle this properly, you'll want to enable GA4's Enhanced Measurement for "Page changes based on browser history events" in your GA4 admin settings.

Tracking Squarespace Form Submissions

Squarespace forms are easier to track than Wix forms because they trigger a real HTTP submission. The success message appears as a DOM update after the response, which means a MutationObserver-based tracking script can detect it reliably.

However, the standard "submit" event listener trick works on Squarespace forms too. When TrackingCoder generates a Form Submission tracking code for a Squarespace site, it uses a layered approach: it listens to the native submit event, watches for the confirmation div to appear, and intercepts the underlying fetch request - so even if the form library updates and changes how it works, at least one of the three detection methods will still catch it.

Tracking Squarespace Commerce Add-to-Cart and Purchases

Squarespace Commerce (the ecommerce side of Squarespace) uses its own checkout system. When a user clicks "Add to Cart", a JavaScript handler updates the cart drawer. When they check out, they go through a multi-step process that ends on the order confirmation page.

Tracking add-to-cart: listen for clicks on elements with class sqs-add-to-cart-button (the Squarespace standard). Tracking purchases: detect navigation to the order confirmation page, parse the order total from the page DOM, and fire the purchase event.

Both of these require JavaScript that's specific to Squarespace's class names and DOM structure. TrackingCoder generates the right code automatically when you scan a Squarespace Commerce store.

Adding Meta Pixel and Google Ads via GTM

Now that GTM is installed, adding additional tracking platforms is straightforward - you do it inside GTM, not back in Squarespace. To add the Meta Pixel: create a new tag in GTM, choose Custom HTML, paste the Meta Pixel base script with your Pixel ID, and set the trigger to All Pages. Same approach for Google Ads, LinkedIn Insight Tag, and Microsoft UET Tag.

This is the entire reason to use GTM rather than pasting each tracking script directly into Squarespace's code injection panel. Code injection has a character limit, mixing multiple scripts gets messy fast, and changing one tracking pixel later means hunting through a wall of code. With GTM, every change is a simple tag edit and republish.

Squarespace Tracking Limitations

Even on the highest Squarespace plan, there are a few tracking limitations to be aware of:

  • No noscript GTM fallback. As mentioned, the body-tag GTM snippet can't be installed. Tracking will fail for users with JavaScript disabled (rare).
  • Code injection isn't editable per page. You can only set global header/footer code. If you need a tracking script that only fires on specific pages, you'll need to handle that with GTM triggers, not Squarespace's injection panel.
  • Member areas have separate code injection. If you use Squarespace Member Areas, you'll need to enable the same GTM snippet in the Member Areas settings separately.

Verifying Your Tracking Works

The fastest way to verify: open your Squarespace site, then in another tab open GA4 Reports → Realtime. You should see your visit appear within 30 seconds. Trigger an event (submit a form, add a product to your cart) and confirm it shows up in the Realtime events list.

For a more thorough check, use GTM Preview mode. It opens your site with a debug panel that shows every tag that fires, every trigger that activates, and the value of every variable. This is the gold standard for verifying GTM-based tracking works correctly before you publish to production.

Skip the manual setup

TrackingCoder detects your CMS and plugins automatically, then generates ready-to-use tracking code. No more adapting generic tutorials - get code tailored to your exact setup in under 2 minutes.

Try TrackingCoder Free →

2 free credits on signup. No card required.