Conversion tracking & checkout
To count sales, your checkout needs to tell RevvyScales when a purchase happens.
How it works
- Each CTA click gets a unique click_id automatically appended to your destination URL (
?click_id=…&cid=…). - Your thank-you/confirmation page pings us back with that click_id when the order completes.
- We attribute the conversion to the exact session, variant, and pixel — and fire the Purchase event.
If only a few sales are showing up, it's almost always step 2: the click_id isn't making it back to us from the checkout. The fix depends on your platform.
Shopify (recommended setup)
Shopify strips URL parameters during checkout, so the click_id from the CTA link is gone by the time the buyer reaches the thank-you page. The fix is to capture it on arrival (store it in a cookie) and read it back on the thank-you page.
Step 1 — Capture the click_id site-wide. In your Shopify admin: Online Store → Themes → Edit code → `theme.liquid`, and paste this just before </head>:
<script src="https://revvyscales.com/api/conversion/track.js"></script>This stores the click_id in a first-party cookie the moment a visitor lands from your VSL, and it survives for 30 days.
Step 2 — Fire the sale on the thank-you page. In Settings → Checkout → Order status page → Additional scripts, paste:
<script src="https://revvyscales.com/api/conversion/track.js"></script>
<script>
Revvy.track({
value: {{ checkout.total_price | divided_by: 100.0 }},
currency: {{ checkout.currency | json }}
});
</script>The {{ checkout.… }} tags are Shopify Liquid — Shopify fills in the real order total and currency automatically. track.js reads the click_id from the cookie set in step 1 and reports the sale. Send it in whatever currency Shopify uses; we convert it to your dashboard currency automatically.
Checkout Extensibility / Shopify Plus (where "Additional scripts" is gone): use a Custom Pixel instead (Settings → Customer events → Add custom pixel):
analytics.subscribe("checkout_completed", async (event) => {
const c = event.data.checkout;
const cid = (await browser.cookie.get("rvs_click_id")) || "";
if (!cid) return;
new Image().src = "https://revvyscales.com/api/conversion/pixel"
+ "?click_id=" + encodeURIComponent(cid)
+ "&value=" + encodeURIComponent((c.totalPrice && c.totalPrice.amount) || 0)
+ "¤cy=" + encodeURIComponent((c.totalPrice && c.totalPrice.currencyCode) || "USD")
+ "&source=shopify";
});Verifying it works
After you deploy the snippet, make a real (or test) purchase, then check your VSL's conversions. You can also watch the server log line [conversion] in click_id=… matched=true/false: matched=true means we tied the sale to a VSL, matched=false means the ping arrived but the click_id didn't come with it (revisit step 1).
Webhook (optional)
You can also set a Webhook URL that we POST to on every CTA click — useful for piping leads into a CRM.
Postback key (optional)
The postback address, the pixel and the script take a click ID and an amount from anyone who sends them. If you want only your own checkout to be able to report sales, make a postback key: open the VSL's or folder's Settings → Tracking, and above the snippets press Make a key. Every snippet and postback URL shown there then carries key=…. Replace the ones you have installed with the new ones, then switch on Only count sales that carry my key. From then on a report without the key is ignored.
A server postback keeps the key secret. A pixel or script on a thank-you page shows it to a buyer who reads the page's code, so use the server postback where your checkout offers one. New key replaces the key at once; the old one stops working. Store webhooks (Shopify, Whop, CartPanda) and RevvyScales' own checkouts are signed already and never need the key.