All posts
ShopifyIntegrationE-commerceSetup Guide

How to Connect Shopify to Your Podcast Attribution Tool

Castlytics TeamFebruary 18, 20266 min read

If you're running a Shopify store and advertising on podcasts, connecting your attribution tool to Shopify is the single highest-leverage setup step you can take. It eliminates manual conversion tracking, captures promo code data automatically, and gives you accurate ROAS in near-real-time.

Here's what the Shopify integration does, why it matters, and how to set it up.

What the Shopify Integration Does

When you connect Shopify to Castlytics, three things happen automatically:

1. Orders sync in real-time. Every completed order in your Shopify store is sent to Castlytics as a conversion event. This includes the order value, currency, and customer identifier — so revenue attribution works without any custom code on your confirmation page.

2. Promo codes sync automatically. If a customer uses a promo code at checkout, that code is included in the order data that syncs to Castlytics. Castlytics then matches the code against your campaigns and attributes the conversion automatically.

3. Refunds and cancellations sync. If an order is refunded or cancelled in Shopify, Castlytics updates the conversion accordingly — so your attributed revenue reflects actual net revenue, not gross.

Why This Matters for Podcast Attribution

Without the Shopify integration, you'd need to add a conversion tracking snippet to your checkout confirmation page. This works, but it has two limitations:

Promo code data is often missing. The client-side conversion snippet fires on the confirmation page, but passing the promo code from the checkout to the snippet requires custom development. Many brands skip this step and lose promo code attribution entirely.

Order cancellations aren't captured. If you track conversions client-side and a customer later cancels, your attribution data still shows the conversion as revenue-generating. This inflates your ROAS.

The Shopify integration solves both problems automatically.

What Data Flows from Shopify to Castlytics

| Data Point | What It's Used For | |---|---| | Order ID | Unique identifier, deduplication | | Order total | Revenue attribution, ROAS calculation | | Currency | Multi-currency support | | Discount code used | Campaign promo code matching | | Customer ID | Repeat customer detection | | Order status | Refund and cancellation sync | | Order timestamp | Attribution window calculation |

Note: Castlytics does not receive customer PII (name, email, address) through the Shopify integration. The integration uses Shopify's anonymised order data endpoints.

How to Connect Shopify

Step 1: Go to Settings → Integrations

In your Castlytics dashboard, navigate to Settings → Integrations.

Step 2: Click "Connect Shopify"

You'll be redirected to a Shopify OAuth flow. Log in to your Shopify admin if prompted.

Step 3: Authorise the integration

Review the permissions Castlytics is requesting:

  • Read orders — to receive order data for attribution
  • Read customers — for customer identifier matching (anonymised)
  • Read discounts — to match promo codes to campaigns

Click "Install app" to complete the connection.

Step 4: Verify order sync

Once connected, return to your Castlytics dashboard. Check Settings → Integrations to confirm Shopify shows as "Connected."

Place a test order using one of your campaign promo codes. Within a minute, you should see the conversion appear in your campaign dashboard under "Promo Conversions."

Step 5: Backfill historical orders (optional)

Castlytics will begin syncing all new orders from the moment of connection. If you want to import historical orders (e.g., to see promo code attribution from the past 90 days), contact support to request a historical backfill.

Handling Promo Codes Correctly

For the promo code matching to work, you need to ensure:

1. Each campaign has a unique code registered in Castlytics. In your campaign settings, add the promo code you're using for that campaign. When an order with that code syncs from Shopify, it will be matched to this campaign.

2. Codes must match exactly. The code registered in Castlytics and the code used in Shopify must be identical (case-insensitive). PODS15 and pods15 are treated as the same; POD15 and PODS15 are different.

3. Codes must exist in your Shopify discounts. If a customer uses a code that doesn't exist as a valid Shopify discount, the order will still sync but the code won't match anything. Make sure your Shopify discount codes are set up before you brief the host.

Common Shopify + Podcast Attribution Setups

Standard DTC Setup

The most common setup:

  • Tracking script installed on Shopify theme
  • Shopify integration connected
  • Unique promo code per campaign
  • 30-day attribution window

This captures:

  • Show notes link clickers (tracking script + link click)
  • Vanity URL visitors (tracking script + vanity path)
  • Promo code users (Shopify integration → promo code match)

Subscription Product Setup

For Shopify stores selling subscription products (via Recharge, Bold, or Shopify Subscriptions):

  • Initial order syncs as a conversion in the normal way
  • Subscription renewals can be excluded from attribution (they're not campaign-driven)
  • Track initial subscription ROAS, not lifetime subscription revenue (unless you're specifically measuring LTV)

Multi-Store Setup

If you have multiple Shopify stores (e.g., US and EU), you can connect each store separately to the same Castlytics workspace. Conversions from each store will sync independently.

Diagnosing Shopify Integration Issues

Orders syncing but promo code not matching:

  1. Check that the promo code in Castlytics matches exactly what's in Shopify
  2. Confirm the customer actually used the code at checkout (check the order detail in Shopify)
  3. Verify the Shopify integration has "Read discounts" permission enabled

Orders not syncing at all:

  1. Check the integration status in Settings → Integrations
  2. If showing "Error" or "Disconnected", reconnect the integration
  3. Check Shopify admin to ensure the Castlytics app is still installed

Revenue numbers differ between Shopify and Castlytics:

  • Castlytics shows only attributable revenue (sales linked to campaigns), not total store revenue
  • Refunded orders reduce attributed revenue in Castlytics but may lag the refund in Shopify
  • Check the date range — Castlytics uses conversion timestamp, Shopify uses order timestamp

After Connection: What Changes

Once the Shopify integration is live, you'll notice:

Promo conversions appear automatically. Any order with a campaign promo code will show up under that campaign's "Promo Conversions" without any additional setup.

Revenue attribution is more accurate. Refunds and cancellations reduce your attributed revenue to match net revenue.

You don't need to edit your Shopify theme. If you've installed the tracking script on your Shopify theme (for link click and vanity path tracking), the Shopify integration handles the conversion tracking side. You can remove any manual conversion snippets from your Shopify checkout.

Historical data is available. Once connected, you can see how promo codes you've been using historically map to campaigns — useful for validating past campaign performance.

The Shopify integration takes about five minutes to set up and pays for itself in attribution clarity within the first campaign.

Ready to track your podcast ad ROI?

Castlytics gives you per-campaign attribution, real-time ROI, and listener journey analytics — free to get started.

Start free — no credit card