Connect Castlytics to your WooCommerce store and automatically match coupon codes, tracking links, and order data to your creator ad campaigns.
Install the WordPress plugin in 60 seconds — or connect via the REST API for more control.
Install the plugin from the WordPress directory, enter your Castlytics Site Key, and you're done. The plugin automatically injects the tracking snippet on all pages and sends every completed order to Castlytics — no REST API credentials, no webhook configuration, no code.
Three automated data flows that connect your WooCommerce store to Castlytics attribution.
Each creator campaign gets a unique coupon code. When a WooCommerce order uses that code, the conversion is automatically attributed to the campaign. No manual matching needed.
WooCommerce sends order data to Castlytics via webhook the moment an order is placed. Revenue, coupon code, and order status are synced in real time to your dashboard.
See revenue generated per campaign, per creator, and per channel. ROAS is calculated automatically as orders flow in — no spreadsheets, no manual calculations.
WooCommerce REST API plus order webhooks — no plugin, no custom PHP, no modifications to your store files.
Consumer key + consumer secret — read-only access
Generate a read-only API key in WooCommerce Settings → Advanced → REST API. Enter the consumer key and secret in your Castlytics integration settings. Castlytics only requests read access — it never modifies orders or products.
Read-only WooCommerce API access — no write permissions required
woocommerce_order_status_completed → Castlytics endpoint
Castlytics registers a webhook for the order.completed event. When a WooCommerce order completes, the full order object — including coupon codes, line items, and order total — is sent to Castlytics automatically.
Webhook registered programmatically via WooCommerce REST API — no manual setup
Order coupon_lines[].code compared to active campaign codes
Castlytics compares the order's coupon code to all active campaign promo codes. A match triggers a conversion event: the order total is attributed to the campaign and your ROAS dashboard updates in real time.
Conversion window is respected — orders outside the window are not attributed
Choose whichever fits your workflow.
Search "Castlytics" in WordPress → Plugins → Add New, or download directly from the WordPress plugin directory. Activate it.
Find your Site Key in your Castlytics dashboard under Settings → Developer API. Paste it in and click Save. The tracking snippet is injected and order tracking is live immediately.
Add the Castlytics script to your WordPress theme's header. Use a header plugin or add it to your theme's header.php file.
<script src="https://castlytics.app/tracker.js" data-key="YOUR_KEY" async></script>In WooCommerce, go to Settings → Advanced → REST API → Add Key. Set permissions to Read Only. Copy the consumer key and consumer secret.
In your Castlytics dashboard, go to Integrations → WooCommerce. Enter your store URL, consumer key, and consumer secret.
// Castlytics WooCommerce config
{
storeUrl: "https://yourstore.com",
consumerKey: "ck_xxxxxxxxxxxx",
consumerSecret: "cs_xxxxxxxxxxxx"
}Create a campaign in Castlytics for each creator and set the promo code. Ensure the same coupon code exists in WooCommerce Coupons. Place a test order to verify the integration.
Castlytics connects via the WooCommerce REST API and order webhooks. When an order is placed, WooCommerce sends the order data to Castlytics. We match the coupon code against your active campaign promo codes and record the conversion automatically.
Yes — the official Castlytics for WooCommerce plugin is available on the WordPress plugin directory. Install it, enter your Site Key under Settings → Castlytics, and tracking is live in under a minute. No REST API credentials or webhook setup needed.
Castlytics receives order total, coupon code used, order status, and a hashed customer email for LTV tracking. We use read-only access and do not store full customer names, addresses, or payment information.
Yes. Castlytics matches any coupon code type in WooCommerce — fixed cart, percentage, fixed product, or free shipping. The code string is matched regardless of discount type.
If your store is behind a firewall that blocks outbound webhooks, Castlytics can use a polling fallback: we query your WooCommerce REST API every 15 minutes to pull new orders. Your REST API must be accessible from our servers.
Free plan includes 3 campaigns, unlimited clicks, and 30-day attribution. No credit card required.
Create free account →