Squarespace revenue tracking: see which channel brings each sale
By Devendra Variya, co-founder of Virling. Published 2026-11-19, updated 2026-11-29.
Squarespace is built around its own store, and that store is the one thing Virling cannot read: orders paid in Squarespace Commerce are not imported. What Virling can do is give a channel to every sale that leaves your Squarespace site for a Stripe Payment Link or a LemonSqueezy, Polar or Dodo Payments checkout. That takes one tag in the site-wide Code Injection panel and plain checkout links on your buttons. Here is where the tag goes, which plans allow it, and how to tell the two kinds of sale apart.
Where the tag goes in Squarespace
Open Settings, then Developer tools and Code injection (on older menus it sits under Settings, Advanced). The panel has several boxes: Header goes into the <head> of every page, Footer goes before the closing body tag, and the Lock page, Order confirmation page and Order status page boxes serve narrower spots. Paste the tag from the Virling app into Header and save:
<script defer src="https://app.virling.com/v.js" data-site="yourdomain.com"></script>
Squarespace's code injection article lists the panel on the Core, Plus and Advanced plans and some legacy plans. If a site moves down to a plan without it, the code stays in the panel but stops running. Skip the page-level header box that each page's settings offer: it only reaches that one page, and a buyer can arrive anywhere. The framework setup docs cover the same panel.
Squarespace Commerce and Pay Links
Squarespace Commerce runs its own cart and checkout, and Pay Links are shareable links that open a Squarespace checkout page for a single item, donation or tip. Neither is a payment source Virling connects to, and Squarespace checkout pages do not accept custom code, so the script never runs where those buyers pay. Virling still records the visits to your product pages, but the orders themselves get no channel and do not appear as payments.
Squarespace can take payments through Squarespace Payments, Stripe or PayPal. If those charges land in a Stripe account that you also connect to Virling, Virling counts them as revenue under Unattributed, since no visitor ID travelled with them. For a product where the channel matters, sell it through a Stripe Payment Link instead of the Squarespace cart.
| Sale made through | In Virling |
|---|---|
A Squarespace button linked to buy.stripe.com, lemonsqueezy.com, buy.polar.sh or checkout.dodopayments.com | Payment with its channel |
| A Stripe Buy Button pasted into a code block | Payment, Unattributed, if Stripe is connected |
| Squarespace Commerce checkout or a Pay Link | Visits only, no order |
Turning a button into a tracked sale
In the Squarespace editor, click your button, open its link settings and paste the checkout URL from your provider, for example https://buy.stripe.com/abc123. Leave UTM tags and IDs off it. On the published page, the script appends the visitor ID in the field each provider keeps:
- Stripe Payment Links get
client_reference_id, which Stripe stores on the Checkout Session. - LemonSqueezy links get
checkout[custom][virling_vid], returned in the order webhook that Virling registers on your stores. - Polar links get
reference_id, and Dodo Payments links getmetadata_virling_vid.
Then add the provider under Payment connections in Virling's site settings: a restricted Stripe key with Read access, a LemonSqueezy API key, or a Polar organization access token. Each payment is credited to the visit behind it, last non-direct by default, with first touch and last touch as options. The checkout docs and the integrations page have the details per provider. A Buy Button in a code block is made from a Payment Link, so swapping it for a normal Squarespace button with that same link fixes its missing channel.
Test from a logged-out window
- Save the Header box, then open a private window so Squarespace does not treat you as the site owner.
- Go to
https://yourdomain.com/?utm_source=test&utm_medium=teston your own domain. - Look in Virling: the visitor is under Visitors and
testappears on the Channels card. If not, check that the tag sits in the site-wide Header box and that the plan includes Code Injection. - Right-click the checkout button and copy its address; a Stripe link should now end in
client_reference_id=plus an ID. Pay through a test Payment Link with a Stripe key that startsrk_test_. Polar sandbox and Dodo Payments test links are not tagged, so for those make a small live payment and refund it. - Give it a minute and open
/app/yourdomain.com/payments. The payment readstest, and Visitor under Details links to the visit.
Test payments are kept when you switch to a live key. More troubleshooting is in test your setup, and every builder is in the no-code guide. A site built in Framer has its own walkthrough: tracking sales from a Framer site.
Squarespace settings that stop the tag
- You are logged in. Logged in, Squarespace shows the site on its built-in squarespace.com domain, and Virling records only the domain in
data-siteand its subdomains. - Scripts are off in preview. If code breaks the editor preview, Disable Scripts in Preview turns it off for you while visitors still get it. Check from a private window.
- The site is still a trial. A trial site is private, so outside visitors hit a login page.
- Ajax loading is on (version 7.0). Squarespace notes it can conflict with custom code; turn it off and retest.
- The buyer came straight to the checkout. A Payment Link sent in an email, a post or a QR code skips your pages and carries no ID.
- A custom checkout domain or
data-cookieless. Only the provider hosts above are tagged, and cookieless mode has no ID to pass. For your own checkout domain, readwindow.virling.vid()and add it yourself.
For what a Stripe Payment Link keeps and drops, see Stripe Payment Link UTM tracking. Other builders: Wix, Carrd and WordPress.
Frequently asked questions
Can Squarespace show which channel brought a sale?
Only for sales that leave Squarespace for a hosted checkout, and only with the Virling tag in Code Injection. The tag puts a visitor ID on Stripe Payment Links and LemonSqueezy, Polar or Dodo checkout links, and Virling joins each payment to the visit and its channel.
Does Virling track Squarespace Commerce orders?
No. Squarespace Commerce and Pay Links are not a payment source Virling connects to, and Squarespace checkout pages take no custom code. Virling records visits to your store pages, but those orders get no channel. If the charges land in a Stripe account you also connect to Virling, they count as Unattributed revenue.
Which Squarespace plan do I need?
A plan with Code Injection. Squarespace lists it on Core, Plus and Advanced and some legacy plans. On a plan without it, saved code stays in the panel but does not run.
Which Code Injection box should the tag go in?
The site-wide Header box, so it loads on every page. A single page's header box only covers that page, and the order confirmation and order status boxes only run after a Squarespace checkout.
Why do my own visits not show when I am logged in to Squarespace?
While you are logged in, Squarespace shows the site on its built-in squarespace.com domain, and Virling records only the domain you added and its subdomains. Test from a private window on your own domain.
Why does my Squarespace sale show as Unattributed?
The sale went through the Squarespace checkout, the buyer opened the checkout link from an email, a post or a QR code, or the checkout came from a Buy Button in a code block. A custom checkout domain or cookieless mode also leave the sale without a channel.
See which channels bring revenue to your Squarespace site
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.