Server-side tracking for Shopware 6
Add a Shopware integration with read access to orders and ROASaurus syncs paid orders from the Admin API. A Flow Builder webhook makes them arrive the moment they are paid.
| Shopware at a glance | |
|---|---|
| Orders arrive by | Admin API polling every 5 minutes; instant with a Flow Builder webhook |
| Credentials | Integration access key ID and secret access key |
| Paid orders | A transaction in state paid |
| Order id | The Shopware order number |
| Thank-you snippet | checkout/finish template, using page.order.orderNumber |
How Shopware connects
- Add the ROASaurus script to your theme (
base.html.twig, blockbase_script_tracking) or with a tag manager plugin. - Settings › System › Integrations › Add integration, with read access to orders. Enter the access key ID and secret access key in ROASaurus.
- For exact matching, add the thank-you snippet to
storefront/page/checkout/finish/index.html.twig.
ROASaurus exchanges the integration keys for a short-lived Admin API token and searches orders updated since its last run, every 5 minutes. An order counts as paid when one of its transactions is in state paid. The order number is used as the id, which is also what the thank-you snippet sends.
Instant orders with Flow Builder
On Shopware Evolve and up, create a flow with trigger State Enter / Order Transaction / State / Paid and action Call URL (Webhook), POST to your ROASaurus webhook URL. The call is only a signal: ROASaurus does not trust its content, and instead fetches the orders of the last two hours through the authenticated API. Orders it already has are ignored.
What ROASaurus reads from each order
The total, currency, order date, customer email and name, billing phone, city, zip and country, the customer id and the product line items with their quantity, unit price and product number.
Linking orders to ad clicks
The thank-you snippet fires the ROASaurus purchase with the order number and total, which links the order to the visitor. Without it, ROASaurus uses an email the visitor gave earlier on your site, such as in a popup.
Limits
- Shopware anonymizes the customer IP address by default, so the IP fallback rarely helps. Add the thank-you snippet.
- Flow Builder webhooks need Shopware Evolve or higher. Without them, orders take up to 5 minutes.
- 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
Do I need Flow Builder?
No. Without it ROASaurus fetches paid orders every 5 minutes. The Flow Builder webhook, available on Shopware Evolve and up, only makes them arrive right away.
Is the Flow Builder webhook secure?
ROASaurus treats it as a signal only. It never takes order data from the call; it fetches recent orders through the Admin API with your integration keys.
What access does the integration need?
Read access to orders. ROASaurus uses the integration's access key ID and secret to get a short-lived Admin API token.
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 →