Store connections
Connect a custom website
Add the tracking script to every page, send each paid order to ROASaurus (as JSON to your webhook URL, or to the orders API), and fire the purchase with the same order id on your thank-you page. That covers visits, orders and the link between them.
Before you start
- A developer, or a no-code tool (Zapier, Make, n8n) that sees your paid orders.
- A store added as Add a store › Other / custom webhook.
Steps
Add the store
In ROASaurus, open the store menu at the top of the sidebar, choose Add a store, then Other / custom webhook. Enter the address your customers visit and click Continue.
You should see: Connect Other / custom webhook, with Last order received: none yet, Last sync: never, the numbered setup steps and the credential fields.
Add the tracking script
Copy the script tag from step 1 of the connection page. It contains your store key. Paste it before
</head>on every page; site builders call this custom code, code injection or header scripts.You should see: Open your shop with
?roasaurus=connectedat the end of the address: the browser says "ROASaurus is connected."Send paid orders
Choose one way:
- Webhook: POST each paid order as JSON to Your webhook URL. Fields:
order_id,total,currency,email,phone,first_name,last_name,country,zip,client_ip,user_agent,items(variant_id,quantity,price) and, when you can,visitor_id: the value of the_tlcookie. A list of orders in one request works too. - Orders API:
POST https://app.roasaurus.com/api/v1/orderswith the headersX-Roasaurus-Key(your store key) andAuthorization: Bearerwith an API key from Settings › Store › Orders API. The example request is shown there.
You should see: The order under Profit › Orders, and Last order received on the connection page.
- Webhook: POST each paid order as JSON to Your webhook URL. Fields:
Add the thank-you page snippet
The connection page shows a snippet that fires the browser purchase with the order id. Fill in the order id, total and currency on your order confirmation page. It links the order to the visitor and their ad click exactly; without it, ROASaurus matches by email or by IP address and browser.
What you should see
Visits and ad clicks come from the script, paid orders from your backend, and each order carries the clicks of its visitor, from the visitor_id or the thank-you page event.
How orders are matched to visits
Most reliable first: the visitor_id in the order, the purchase event on the thank-you page with the same order id, an email address the visitor gave earlier with consent, and, as a last resort, the only visitor on the same IP address and browser shortly before the order.
A Shopify store without the app
A Shopify admin webhook for order payment (or order creation with an external checkout) to the same URL works too, and a Refund creation webhook takes refunds off revenue. The app gives you more: history, product costs and refunds without setup.
Headless
Headless Shopify (Hydrogen) has its own module: Hydrogen and headless storefronts.
Common problems
Orders arrive but have no channel
visitor_id nor the thank-you event reaches ROASaurus. Pass the _tl cookie as visitor_id, or add the thank-you snippet with the same order id.I sent an order again with changes, but nothing changed
order_id and ignores repeats, so sending an order twice never counts it twice. Send each order once, when it is paid.Orders API answers 401
Next step
Continue with Getting startedStill stuck? Email us.