Skip to content
Website builders

Squarespace analytics with Commerce orders matched to visits

2 min read · Updated · By the Reveata team

Short answerPaste the Reveata snippet into Squarespace's Code Injection header and add a short call to the Order Confirmation Page field. Each order is then credited to the visitor who just bought.

Squarespace doesn't run custom code on checkout pages, but it does on the order confirmation page, and it fills in the order's details there. That is the hook Reveata uses to connect a Squarespace Commerce order to the visit behind it.

What you get

  • Every page tracked from the Code Injection header.
  • Commerce orders as revenue, when you connected your own Stripe account in Commerce → Payments.
  • Each order credited to the visitor who bought, from the Order Confirmation Page field.
  • Squarespace Payments and PayPal orders counted as unverified browser payments, if you choose.

How to install it

  1. Open Settings → Developer Tools → Code Injection (on older sites Settings → Advanced → Code Injection) and paste the snippet into Header. It needs a plan with custom code; on the Basic plan the code is kept but doesn't run. Squarespace explains it in Using code injection (opens in a new tab).
  2. In Reveata, add the website with your custom domain; the .squarespace.com address is refused unless you add it as an additional domain.
  3. Connect the same Stripe account in Reveata's Settings → Payments.
  4. In Code Injection's Order Confirmation Page field, call reveata('payment', { email: '{customerEmailAddress}' }). The full snippet is in the Squarespace install guide.

How orders are matched

The next payment with that email, from a day before to a day after, is credited to the visitor who just bought (thank-you page payments). This uses Match payments using browser identify calls, on by default.

Squarespace Payments and PayPal are not a Stripe account Reveata can read. To count those orders anyway, turn on Accept unverified browser payments and send the subtotal (without tax and shipping) in your store currency from the same field. Such payments are marked Unverified, because anyone could send one from a browser. Use one of the two snippets, not both.

Serving the script from your own domain

Squarespace can't run proxy code, but the managed proxy needs only a DNS record, such as stats.example.com. For a domain registered with Squarespace, add it under Domains → your domain → DNS → Custom records.

Frequently asked questions

Can I track clicks on Squarespace buttons?

Squarespace has no field for attributes on its buttons. Use a page-visit goal for the page people reach after the action, or a button in a Code block with data-reveata-goal="signup".

Why don't I see my own visits?

Test logged out (or in a private window) on your custom domain, with ad blockers turned off for the site. The editor doesn't count.

Does a cookie banner change anything?

If it holds scripts back until people accept, visits count only after they do. Cookieless mode needs no cookies.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
IntegrationStripe revenue analytics by traffic sourceReveata reads your Stripe payments, invoices, subscriptions, refunds and lost disputes through a read-only connection, then credits each payment to the visit that brought the buyer, so revenue sits next to traffic in every report.IntegrationBubble app analytics with ReveataPaste the Reveata snippet into Bubble's header script setting and deploy to Live. Every page and in-page navigation is counted, and signed-in users you identify with a Run javascript workflow are linked to their visits.IntegrationCarrd analytics for one-page sitesAdd the Reveata snippet to your Carrd site as a hidden Embed element placed in the head, then publish. Every visit is counted with its source, so you can see which links and channels bring signups and sales.IntegrationFramer analytics with sales credited to visitsAdd the Reveata snippet in Framer's Custom Code settings at the end of the head, on all pages, and publish. The script follows Framer's page changes, and sales from the checkouts your buttons link to are credited to their visits.IntegrationGhost analytics for posts, newsletters and membersPaste the Reveata snippet into Ghost's Site header code injection to track every page on Ghost(Pro) or self-hosted Ghost, with no theme change. A page only new members see turns each new membership into a goal with no code.IntegrationWebflow analytics with revenue attributionPaste the Reveata snippet into Webflow's site-wide Head code and publish. Every page is counted, and sales from the checkouts your pages link to are credited to the visits that brought the buyer.