Squarespace Conversion Tracking: GA4, Code Injection and What You Cannot Track
A plain map of Squarespace conversion tracking for marketers: what the built-in GA4 and Meta Pixel integrations send, where code injection goes and which plan it needs, how to tag orders and forms, and the limits you cannot work around.
In short
Squarespace conversion tracking uses two built-in fields, a GA4 measurement ID under Developer tools and a Meta Pixel ID, plus code injection for anything else. Code injection needs the Core, Plus or Advanced plan. Sales tags go on the order confirmation and order status pages, because checkout pages accept no custom code at all.
Squarespace conversion tracking comes in two layers. The first is built in: a field for your GA4 measurement ID, which sends page views and, if you track ecommerce in GA4, the details of each store order, and a field for your Meta Pixel ID, which fires a fixed set of shopping and sign-up events. The second is code injection, where you paste tags for Google Ads, TikTok or anything else. Code injection is a paid feature from the Core plan upwards, and even then there is one place you can never add code: the checkout page. This guide covers what each layer does, where each field lives, and the limits to know first.
What Squarespace tracks without any code
Both built-in integrations are set up by entering an ID in a panel, with no script needed.
| Integration | Where to enter it | What it sends | Plan |
|---|---|---|---|
| Google Analytics 4 | Developer tools, then External API keys, then the Google Analytics account number field | Page views, plus, if you track ecommerce in GA4, order details for every sale: order ID, product name, SKU, purchase total including shipping, store name and the customer's city, region and country | Not listed in Squarespace's GA4 article |
| Meta Pixel | The Meta Pixel & Ads panel, Pixel ID field | ViewContent, Search, AddToCart, InitiateCheckout, AddPaymentInfo, Purchase, Lead and CompleteRegistration | Core, Plus, Advanced, and the older Business, Commerce Basic and Commerce Advanced plans |
For GA4, the measurement ID must start with G- and come from a GA4 property. If an old Universal Analytics ID is still in the field, replace it. Squarespace says data can take up to 24 hours to appear in Google Analytics.
You can add only one pixel ID. The Purchase event is not sent for test orders, and a subscription sends Purchase only for its first order. The article lists Lead only for newsletter block sign-ups, promotional pop-ups, cover pages and the newsletter option at checkout, not for an ordinary form block, so do not count on a contact form enquiry reaching Meta as a Lead. Check Events Manager after a test submission. The help article describes a browser pixel and says nothing about the Conversions API, so do not assume server events are included. Our comparison of the Meta Pixel and the Conversions API explains why that gap matters. If you previously pasted pixel code into code injection, Squarespace asks you to remove it from the Header and Order Confirmation Page fields before using the built-in field, so the same events are not sent twice.
Code injection: the fields and the plan you need
Code injection is the Squarespace name for pasting scripts into fixed places on your site. Squarespace makes it available on the Core, Plus, Advanced and some legacy plans, and its plan guide lists JavaScript in code blocks from Core upwards too. The Basic plan's custom code is limited to HTML, Markdown and CSS, with no JavaScript and no code injection. The Code Injection panel has these fields:
- Header: added inside the head tag of every page. This is where a site-wide tag such as the Google tag or the TikTok pixel base code goes.
- Footer: added just before the closing body tag of every page.
- Page Header Code Injection: set in a single page's Advanced settings, for a tag that belongs on one page only.
- Post Blog Item Code Injection: added to every blog post.
- Lock page: shown above the password field on a password-protected site or page.
- Order Confirmation Page and Order Status Page: code that runs after a purchase.
Checkout pages do not support code. Squarespace states plainly that you cannot add custom code to them. That means no custom checkout-step tags, such as a begin checkout or add payment info event, for Google Ads or TikTok. The built-in Meta integration sends its checkout events itself, which is one reason to use it rather than pasted pixel code.
Tracking sales on the order pages
Which page a buyer lands on depends on what they bought. The order confirmation page appears for gift cards, memberships and subscriptions. The order status page appears for physical, download and service products. A shop selling physical goods with a tag only in the Order Confirmation Page field will record nothing, so paste the same snippet into both fields.
Squarespace replaces six variables on these pages with real order values:
| Variable | What it outputs |
|---|---|
| {orderId} | The order number |
| {orderSubtotal} | The order subtotal |
| {orderSubtotalCents} | The subtotal in cents |
| {orderGrandTotal} | The order grand total |
| {orderGrandTotalCents} | The grand total in cents |
| {customerEmailAddress} | The email address entered at checkout |
There is no currency variable, so type the currency code into the snippet yourself. The email address is personal data: only pass it to a tag that hashes it, and only for visitors who have consented.
Order pages can be reopened, which would count the sale again. Squarespace provides a wrapper that runs code on the first view only: put the script between {.if firstPageView} and {.end}. Anything outside the wrapper runs on every visit. For a Google Ads purchase conversion, the steps look like this:
- 1Paste the Google tag base code from Google Ads into the Header field of Code Injection.
- 2In Google Ads, create a website purchase conversion action and copy its event snippet.
- 3Set the snippet's value to {orderGrandTotal}, its currency to your store currency, such as 'GBP', and its transaction_id to '{orderId}'. Google uses the transaction ID to discard a second conversion with the same ID.
- 4Wrap the snippet in {.if firstPageView} and {.end}, then paste it into both the Order Confirmation Page and Order Status Page fields.
- 5Place a real low-value order, view the page source of the status page, and confirm the variables were replaced with numbers. If the total includes formatting your tag rejects, switch to {orderGrandTotalCents} and divide by 100 in the script.
Do not also add a GA4 purchase tag here if GA4 is connected through the built-in field. Squarespace already sends order data to GA4, and a second tag risks counting each order twice. Our guide to duplicate conversions covers how to spot that in reports.
Tracking form submissions
Neither built-in integration is documented as counting a form block submission as a conversion, so lead tracking is up to you. In the form block, open the Content tab and click Edit Post-Submit. There are two choices, and you can use only one: if a redirect is set, the post-submit message does not display.
- Redirect: click Attach Link and send visitors to a thank-you page. Track that page's URL as the conversion in GA4, Google Ads or Meta. Use a page that is not linked from anywhere else, or direct visits will inflate the count. Redirects do not work while you are logged in, so test in a private window.
- Message: show a confirmation message, with the option to add HTML alongside it. Squarespace calls this an advanced modification it cannot troubleshoot, and its article does not say whether scripts placed there run. Test with a real submission before relying on it.
The redirect is the more predictable route on Squarespace, even though page-based counting has known weaknesses. Our comparison of thank-you page and event-based tracking explains them. To keep a lead's source, a form block's Hidden field can store a query parameter starting with SQF_, a Squarespace-specific version of the approach in our guide to capturing UTM parameters in hidden fields.
Cookie banner and Google consent mode
Squarespace's cookie banner lives in the Cookies & Data Privacy panel. Switch on Cookie banner, then Manage cookies button, so non-essential cookies such as Google Analytics and the Meta Pixel are not placed until the visitor agrees. Adding the Decline all button is optional but makes refusal as easy as acceptance. When the built-in GA4 field, the banner and the Manage cookies button are all on, Squarespace shares the visitor's choice with Google through consent mode, and Squarespace notes that Google Analytics can fill some gaps with behavioural modelling. Our explainer on Google consent mode v2 covers what that modelling does.
That handling covers Squarespace's own integrations. For tags you add through code injection, Squarespace says you may need to make sure your banner can interact with the code, and points to sample code in its forum for Google Ads. A third-party consent platform is configured with that provider, not Squarespace.
Limits you cannot work around
- Ajax loading on version 7.0: the Brine, Farro, Tremont and York template families can load pages without a full reload, and Skye does so on its blog landing page. Squarespace warns this can log analytics hits on the first page only. Uncheck Enable Ajax loading in Site styles. Skye cannot turn it off, and Farro keeps it on the blog landing page. Version 7.1 has no Ajax loading.
- Google Tag Manager works through code injection, but Squarespace will not help set it up or troubleshoot it.
- One Meta Pixel ID per site, and pixel data does not appear in Squarespace Analytics.
- No code on checkout pages, on any plan.
- Squarespace Analytics and GA4 will not match. Squarespace excludes your own logged-in visits and filters bots differently, and declined cookies can make its visitor counts run higher than GA4's.
Checking what a live page actually loads
After setup, check the published site rather than the editor, because logged-in sessions behave differently. The tracking audit fetches one public page and lists the marketing tags it loads, which quickly shows whether the Google tag and any pasted pixel are actually present. It does not watch events fire, so confirm purchases and leads in each platform's own testing view as well. If you want conversions credited to the campaign that brought the visit and sent server-side to Meta, GA4 or TikTok, EndFrame's snippet goes in the same Header field, so it also needs a plan with code injection. Send GA4 purchases from one source only, either Squarespace's built-in field or EndFrame, because GA4 does not remove duplicates. Meta keeps one copy only when the browser and server events share an event ID, and Squarespace documents no way to set one on its built-in pixel, so send each Meta event from one tool, not both.
Frequently asked questions
Can I track Squarespace conversions on the Basic plan?
Only partly. Squarespace's plan comparison lists code injection and JavaScript code blocks from Core upwards, and its Meta Pixel article lists Core, Plus, Advanced and older Business and Commerce plans. On Basic you cannot add a Google Ads tag, a TikTok pixel or an order page snippet, so most ad platform conversion tracking needs an upgrade.
Does Squarespace send Meta Conversions API events?
Squarespace's Meta Pixel help article describes a browser pixel and lists the events it fires. It does not mention the Conversions API or server events. To see what actually arrives, open the pixel in Meta Events Manager and check the connection method shown for each event. If only the browser appears, any server copy has to come from another tool.
Why does my Squarespace conversion code not fire after checkout?
The most common reason is that the code sits in the wrong field. Squarespace shows the order confirmation page only for gift cards, memberships and subscriptions. Physical, download and service products land on the order status page instead, so a store selling those needs the snippet in the Order Status Page field too.
Can I use a hidden field to record where a Squarespace lead came from?
Yes. A form block can include a Hidden field. Its label creates a query parameter starting with SQF_, and a link such as /contact?SQF_SOURCE=spring-ads saves that value with the submission in your form storage. Values must be 100 characters or fewer, and submissions without the parameter keep the field's default value.
Sources
- 1.Connect Google Analytics to your site - Squarespace Help Center
- 2.Customize parts of your site with code injection - Squarespace Help Center
- 3.Using Meta Pixel with Squarespace - Squarespace Help Center
- 4.Form blocks - Squarespace Help Center
- 5.Ajax loading in version 7.0 - Squarespace Help Center
- 6.Choose the right Squarespace plan - Squarespace Help Center
Try EndFrame
Add a server-side path for your conversions.
EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.
No credit card required