Castlytics listens to your Shopify order webhooks and automatically matches every order to the creator campaign that drove it — no manual reconciliation.
Discount code matching, LTV tracking, and per-creator ROAS — all automatic.
Three automated workflows that connect your creator campaigns to real order data.
Create a campaign in Castlytics and the discount code is automatically registered. When an order uses that code in Shopify, the conversion fires in Castlytics without any manual work.
Every Shopify order is checked against active campaign promo codes and tracking link visits. The first matching campaign gets credit. Your dashboard shows orders, revenue, and ROAS per creator.
When a customer is acquired through a creator campaign, Castlytics tags future orders from that customer to the original source. See 90-day LTV and repeat purchase rates broken down by creator.
Castlytics connects to Shopify via the standard order webhook. No app store installation required.
POST orders/paid → Castlytics webhook endpoint
When an order is paid in your Shopify store, Shopify sends a webhook to Castlytics with the full order object — including line items, customer email, total revenue, and the discount_code field.
Uses Shopify's standard orders/paid webhook topic — no custom app required
discount_code field checked against active campaign codes
Castlytics checks the order's discount_code against every active campaign promo code. If there is a match, the order is attributed to that campaign. The revenue is recorded and ROAS is updated in your dashboard instantly.
Discount code matching is case-insensitive and handles partial matches
Cookie-based attribution combined with code matching
If the same customer previously visited via a tracking link or vanity URL (detected by your tracker script), that session is also linked to the order. You get the full attribution picture: whether they clicked, typed the URL, or used the promo code.
Castlytics deduplicates automatically — each order is attributed once
Once Shopify is connected, your dashboard shows real e-commerce metrics — not just clicks.
Revenue divided by estimated ad spend for each creator campaign. Compare ROI across your entire creator portfolio.
Customer acquisition cost calculated per Shopify order attributed to each campaign. Understand what you really pay to acquire each customer.
What percentage of customers acquired through each creator came back and bought again within 90 days. The best signal for creator audience quality.
If customers from a specific creator have a higher refund rate, it may signal audience mismatch. Track this to avoid misleading ROAS numbers.
Four steps. No Shopify app store installation required.
In Shopify admin, go to Online Store → Themes → Edit code → theme.liquid. Paste the Castlytics script tag inside the <head> section.
<script src="https://castlytics.app/tracker.js" data-key="YOUR_KEY" async></script>In your Castlytics dashboard, connect Shopify and enter your store URL. Castlytics registers the order webhook automatically — or you can add it manually in Shopify admin under Settings → Notifications → Webhooks.
// Shopify webhook config
{
topic: "orders/paid",
address: "https://castlytics.app/webhooks/shopify",
format: "json"
}Create a campaign in Castlytics for each creator and set the promo code. The code must exist in your Shopify discount codes — Castlytics matches the field exactly.
Place a test order using a campaign promo code. It should appear in your Castlytics dashboard within 30 seconds. If it does not appear, check that the webhook is registered and the promo code matches exactly.
Castlytics registers an order webhook with your Shopify store. When an order is paid, Shopify sends the order data to Castlytics. We check the discount_code field against your active campaigns and record the conversion automatically.
No custom checkout code is required for discount code attribution — the webhook handles it. For tracking link and vanity URL attribution, add the Castlytics tracker script to your theme.liquid file. This is one script tag that takes about 2 minutes.
Yes. Once a customer is attributed to a creator campaign, Castlytics tags future orders from that customer to the original source. You can see 90-day LTV and repeat purchase rates broken down by creator in your dashboard.
Castlytics only attributes orders when the discount code matches a code you configured in a campaign. Codes not tied to any campaign pass through without attribution — they will not appear in your Castlytics dashboard.
Yes. The integration uses Shopify's standard order webhook API, available on all plans including Basic, Shopify, Advanced, and Shopify Plus. No special Plus-only features are required.
Free plan includes 3 campaigns, unlimited clicks, and 30-day attribution. No credit card required.
Create free account →