Server-side tracking for Squarespace Commerce
ROASaurus reads paid orders from the Squarespace Commerce API every 5 minutes and sends them to your ad platforms from the server. An order status page snippet links each order to the ad click.
| Squarespace at a glance | |
|---|---|
| Orders arrive by | Commerce API polling every 5 minutes |
| Credentials | Developer API key with Orders: read |
| Plan | API keys require the Commerce Advanced plan |
| Paid orders | Payment state PAID |
| Thank-you snippet | Order Status Page code injection, using {orderId} and {orderGrandTotal} |
How Squarespace connects
- Settings › Advanced › Code Injection › Header: paste the ROASaurus script tag.
- On the same page, under Order Status Page (and Order Confirmation Page for digital products), paste the thank-you snippet.
- Settings › Advanced › Developer API Keys › Generate Key with Orders: read, and enter it in ROASaurus.
Why polling and not webhooks
Squarespace sends webhooks only to OAuth apps, not to integrations a merchant sets up with an API key. So ROASaurus fetches orders modified since its last run, every 5 minutes, with a 30-minute overlap. Orders with payment state PAID are sent; duplicates are ignored.
Linking orders to ad clicks
The snippet uses Squarespace's own variables, {orderId}, {orderGrandTotal} and {customerEmailAddress}, to fire the ROASaurus purchase with the same order id. It is wrapped in {.if firstPageView}, so a shopper who reloads the order status page doesn't fire it twice. Without the snippet, ROASaurus falls back to an email the visitor gave earlier on your site, such as in a popup.
What ROASaurus reads from each order
The order number, grand total and currency, the customer email and id, the billing name, phone and address, and each line item's product, variant, quantity, price paid and SKU.
Limits
- API keys need the Commerce Advanced plan.
- Orders arrive up to 5 minutes after payment. "Fetch orders now" syncs on demand.
- Squarespace orders don't include the shopper's IP address, so the IP fallback isn't available. Add the snippet.
- The connector is built from the platform's official API documentation. Press Test connection after saving your credentials, then place a test order and check the Event log.
Related
Questions, answered
Which Squarespace plan do I need?
Developer API keys for orders need the Commerce Advanced plan. The tracking script and snippet work through Code Injection.
Why can't Squarespace send orders instantly?
Squarespace only sends webhooks to OAuth apps, not to merchant API keys. ROASaurus polls the Commerce API every 5 minutes instead.
Will a reload of the order page count twice?
No. The snippet only runs on the first view of the order status page, and ROASaurus ignores a second purchase with the same order id.
Every sale, traced to the ad that earned it
Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.
Start your free trial →