03 · Revenue
Connect Squarespace and tie its orders to visits
Tally reads your store's paid orders and refunds, and the order status page ties each one to its buyer's visit. Allow it on Squarespace's own confirmation page, or paste an API key.
01Connect in one click
On your site's Integrations page, open Squarespace and press Connect with Squarespace.
Tally says what it will be given: your orders and their transactions, read only, and one webhook subscription. It never changes an order. Press Continue to Squarespace.
Squarespace asks you to sign in, as the site's owner or an administrator, and to choose the site. Its confirmation page asks to let Tally read your orders and transactions, offline, so it keeps reading while you're away. Press Allow.
You're back on Integrations: Squarespace is connected, and a year of orders is being imported, refunds included.
From then on each new order arrives within seconds, through the webhook subscription. Every 30 minutes Tally also reads the orders that changed, so one a notification missed still arrives.
02Or connect with an API key
Make an API key in Squarespace
An API key works on the Core, Plus, Advanced and Commerce Advanced plans. In Squarespace, open Settings › Developer Tools › Developer API Keys, choose Generate Key, and give it only these permissions (Squarespace's guide):
Permission Access Why Orders Read Every paid order: its total and tax, and the customer's email (hashed at once, never stored). Names and addresses are never stored. Transactions Read When each refund happened, and how much it gave back. Read Only for both. Squarespace gives webhooks only to apps connected in one click, so with a key Tally reads new orders every 10 minutes. Delete the key in the same place at any time.
Paste the API key
On your site's Integrations page (or the Payments step when you add a site), open Squarespace and fill in:
- API key: Shown once, when the key is made. Tally stores it encrypted and never shows it again.
Then press Connect Squarespace.
Tally checks it and imports the past year
It checks the key against your site and imports the past 365 days, refunds included, then reads new and changed orders every 10 minutes. To tie each order to its buyer's visit, add Tally's snippet in Pages › Custom Code › Code Injection: the tag in Header, and the order status lines from Coverage and fixes in the Order Status Page and Order Confirmation Page fields.
03Add the code in Code Injection
Squarespace runs no app's code on a store, so the code goes in by hand. In Squarespace, open Pages › Custom Code › Code Injection (it used to be under Developer Tools). Squarespace offers Code Injection on the Core, Plus and Advanced plans and some legacy ones, not on Basic or Personal.
Header
The snippet, so every page of the store counts its visits:
<script defer data-site="k3xq2mfa7twp" src="https://t.tallybyoutpost.com/script.js"></script>Order Status Page and Order Confirmation Page
These lines, in both fields. Squarespace shows the order status page after checkout for physical, download and service products, and the order confirmation page for gift cards, subscriptions and memberships. It fills in {orderId} with the order number, and the lines send it:
{.if firstPageView}
<script>
window.tally = window.tally || function () { (tally.q = tally.q || []).push(arguments); };
String('{orderId}').split(/[^0-9]+/).filter(Boolean).forEach(function (order) {
tally('squarespace_order', { order: order });
});
</script>
{.end}
The buyer's visit to that page ties the order to them: high confidence. {.if firstPageView} keeps a later visit to the page, from the email's link, from counting again. Without these lines, an order links by its email when your site calls identify with the buyer's address, with medium confidence (goals and identify).
04What counts as a sale
- An order counts once it's paid, at the time it was placed: its total less tax, with shipping in and discounts already off, in the order's currency.
- Each refund counts at the time it was made, read from the order's transactions, with the order's share of tax.
05What's kept
Of each order, Tally keeps the amounts, dates and payment state, and two hashes: one of the customer's email and one of the order number. The order status page's number is hashed as it arrives, so only the hash is stored. Names, addresses, phone numbers, line items, form answers and notes are never stored.
06Disconnecting
- In Squarespace: disconnect Tally in the Extensions panel, under Connected extensions.
- In Tally: disconnect on the Integrations page. Tally deletes its webhook subscription and forgets its access, but Squarespace keeps listing it under Connected extensions until you disconnect it there too. A key you made yourself, delete in Squarespace.
- Either way, the orders already imported stay, with their receipts.
07Check it worked
08When your own visits don't show
Signed in to Squarespace, a site's owner is sent to the editor and never sees the store as a visitor, so those visits aren't counted. Test in a private window, signed out, and past the site's password if it has one.
Something missing, or not what you see? Write to support@tallybyoutpost.com and say which page.