Sleeknote needs to know when a purchase happens before it can attribute revenue to your campaigns. It doesn't read your store's order database — your website has to send the purchase to the Sleeknote script on the page.
Most stores don't need to do anything. You only need a custom setup if none of these apply to you:
- You use the Sleeknote Shopify app — no custom code needed.
- You use GA4 or Universal Analytics ecommerce through Google Tag Manager — no custom code needed. Follow Google's purchase event documentation and Sleeknote will pick the purchase up from the dataLayer.
Everyone else sends the purchase from their order confirmation page. This works the same way on WooCommerce, Magento, and custom checkouts.
What to Send
Three fields:
- transactionId — required. Your unique order ID. If it's missing or empty, the purchase is dropped. Sleeknote also uses it to avoid counting the same order twice.
- value — strongly recommended. The order total as a number, in the currency the shopper checked out in, for example 149.99. Decide whether to include tax and shipping and stay consistent.
- currency — strongly recommended. An ISO 4217 code, for example EUR, DKK, or USD. If you leave it out, the order is stored as USD. Nothing is converted at this stage.
Line items, coupons, tax, and shipping can be sent as well, but the Revenue page doesn't use them today.
Add the Code
Place this on your order confirmation page, after the Sleeknote script has loaded:
(async function () {
const API = await window.SleekNote.API;
API('purchase', 'customer', {
transactionId: '100234',
value: 149.99,
currency: 'EUR'
});
})();Replace the three values with the real order details. value is a number, so don't wrap it in quotes or include a currency symbol.
Check That It Worked
- Place a test order using a real, unique order ID.
- Confirm the Sleeknote script loads on your thank-you page, and that the purchase call runs after it's ready.
- Open Revenue in your Dashboard. Figures appear once there are purchases that can be attributed.
If Nothing Shows Up
Work through these in order:
- transactionId is missing or empty. Without it the purchase is dropped.
- The Sleeknote script isn't on your thank-you page. See Implement Your Tracking Code.
- currency was left out, so the order was filed as USD and doesn't look the way you expected.
- The purchase fired on a different domain or session than the campaign. Attribution only works within the same session on the same domain.