Server-side tracking for any website
Add one script tag to your site and send paid orders as JSON from your backend or a no-code tool. ROASaurus matches each order to its ad click and forwards it to your ad platforms.
| Custom website at a glance | |
|---|---|
| Script | One script tag on every page: page views, click ids, the _tl visitor cookie |
| Orders API | POST /api/v1/orders with a store key and API key |
| JSON webhook | POST to your webhook URL from your backend, Zapier, Make or n8n |
| Offline events | POST /api/v1/events for leads, demos and rebills |
| Order matching | visitor_id (the _tl cookie), thank-you event, an email the visitor gave earlier, or IP and browser |
1. Add the script
Paste the script tag from your Tracking & platforms page on every page, usually under "custom code", "code injection" or "header scripts". It records page views, captures ad click ids and UTMs, and sets the _tl visitor cookie. Send other events with tlq('track', 'AddToCart', {...}).
2. Send paid orders
Orders API. Create an API key under Settings › Orders API and POST each paid order to /api/v1/orders. The request format is shown on that page. Pass the _tl cookie as visitor_id so the order is matched to the ad click.
JSON webhook. Pick "Other / custom webhook" when you add the store and POST orders 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, if you can, visitor_id. You can also pass click_ids, landing_url and is_first_order, and mark test orders with "test": true so they are stored but not sent.
3. Fire the thank-you event
On the confirmation page, fire tlq('track', 'Purchase', ...) with event_id set to order- plus your order id. That links the order to the visitor even when you can't pass the cookie. Once your server sends orders, browser purchases only link visitors; they no longer create orders.
Leads and subscriptions
The offline events API (POST /api/v1/events) takes leads, demos, MQLs and subscription rebills, matched to a visitor by hashed email. It accepts up to 1,000 events a minute per store, 3 KB each.
Funnels and first-party cookies
List your funnel and store domains under Settings › Linked domains, and links between them carry the visitor id and click ids. Serving the script from your own subdomain (a CNAME) keeps collection on your domain and re-issues _tl as an HTTP cookie. Safari may still cap that cookie at 7 days.
Related
Questions, answered
Do I need a developer?
Not always. Zapier, Make or n8n can post paid orders from your shop or payment tool to the ROASaurus webhook URL. Passing the visitor id from the _tl cookie usually needs a small change on your site.
How do I send test orders?
Add "test": true to the order. ROASaurus stores it so you can check the format, but sends nothing to ad platforms.
What if my site has no backend at all?
Fire the browser purchase on the confirmation page. When a store has no server-side order source, that event creates the order and is forwarded to the ad platforms. A server source is more reliable.
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 →