Why Recharge needs TrackLayer
Shopify-native attribution is usually strong on the first order and weak on everything that happens after it. The moment a customer moves into Recharge, recurring charges, skipped cycles, pauses, reactivations, and churn often live outside the browser event path that most ad platforms were originally trained on. That means the media team keeps reporting efficient customer acquisition while the finance team sees a very different retention curve a month later.
TrackLayer closes that gap by treating Recharge as the revenue authority for subscription state changes. Instead of hoping a platform can infer lifetime value from the first checkout alone, TrackLayer receives the webhook, normalizes the payload, applies the value logic you actually want, and routes the result server-side. LTV then becomes a calculation based on contract behavior and cash events, not a guess hidden inside last-click ecommerce reporting.
Prerequisites
A live Recharge account connected to the subscription flows you want to measure.
Recharge API access and permission to configure webhooks in the Recharge admin.
A TrackLayer Growth+ workspace with access to `/platforms`, `/events`, and `/cohorts`.
A Shopify store where Recharge checkouts, customers, and subscription orders already resolve correctly.
Step-by-step setup
Install the TrackLayer Shopify app and enable Recharge in `/platforms`
Install the TrackLayer Shopify app on the store that owns the Recharge checkout, then open TrackLayer `/platforms` and enable the Recharge integration. Keep the store in observe mode until Recharge payloads are arriving with the expected customer, subscription, and order fields.
TrackLayer Shopify app
store → your-store.myshopify.com
mode → observe
integration → Recharge enabled
source of recurring truth → Recharge
primary destinations → Meta, GA4, warehousePoint Recharge webhooks at the TrackLayer endpoint
Create a Recharge webhook target that posts into the TrackLayer endpoint rather than a theme script or browser relay. The webhook path should be owned by TrackLayer so retries, signature checks, and event normalization happen server-side.
Recharge admin → Integrations → Webhooks
destination URL → https://ingest.tracklayer.io/recharge/webhooks
delivery mode → server-to-server
retries → enabled
secret → rotate and store in TrackLayerMap the Recharge event set
Start with the full subscription lifecycle instead of just charged orders. This gives TrackLayer enough context to separate acquisition from retention, identify at-risk accounts, and keep value models stable when a subscription changes before the next bill.
subscription/created
subscription/processed
subscription/cancelled
subscription/skipped
subscription/paused
subscription/activated
customer/created
order/createdRun a $0 test subscription
Use a controlled test product or discount path that creates the subscription without forcing a live charge. The point is to validate identity, event IDs, and state transitions first. A cheap or $0 flow also makes it easier to repeat the same test after mapping changes.
Test flow
product → internal test subscription
first charge → $0
expected events → customer/created, subscription/created, order/created
follow-up check → subscription/processed after first real renewalVerify in TrackLayer `/events` and Meta Events Manager
Open TrackLayer `/events` first and confirm one canonical purchase-like record for the subscription revenue you decided to optimize on. Then check Meta Events Manager and match the same server event by event ID, value, currency, and hashed customer identifiers.
Verification checklist
TrackLayer /events → subscription_id present
TrackLayer /events → purchase_event value matches chosen revenue model
Meta Events Manager → same event_id accepted
Meta Events Manager → purchase_event value equals subscription revenue
no duplicate browser purchase for the same renewalRevenue attribution approach
The hard part is not getting Recharge data into TrackLayer. The hard part is deciding what value a paid platform should optimize against. Some brands only want to bid on the first order because that is the cleanest audited cash event. Others want modeled LTV because the first shipment loses money but subscription cohorts pay back over time. Others still want a recurring revenue proxy such as MRR so optimization favors customers who stick.
Pick one model per optimization lane. Mixing first-order value on Monday, 90-day LTV on Wednesday, and rebill revenue on Friday is how training data turns incoherent. TrackLayer can store all three values, but the destination payload should have one primary bidding value.
First order
const purchaseValue = firstOrderNetRevenue;
const firstOrderNetRevenue =
initialCharge - discounts - shippingSubsidy;Modeled LTV
const purchaseValue =
avgCycles90d * netRevenuePerCycle;
const avgCycles90d = 3.4;
const netRevenuePerCycle = 27;MRR proxy
const purchaseValue =
monthlyCharge * retentionWeight;
const monthlyCharge = 39;
const retentionWeight = 1.6;Trial → paid tracking
Recharge setups with prepaid plans, delayed first shipments, or trial offers should not collapse every stage into one purchase. Treat the trial start as a predictive signal and the first paid capture as the monetization event. That lets TrackLayer keep the customer journey intact while preventing free-start volume from inflating reported ROAS.
if (event === "subscription/created" && chargeToday === 0) {
emit("trial_started", { subscription_id, customer_id, trial_end_at });
}
if (event === "subscription/processed" && amountCharged > 0) {
emit("trial_converted", { subscription_id, customer_id, value: purchaseValue });
}Cancellation signals
If paid media only sees starts and never sees cancellations, ROAS becomes structurally overstated. Recharge cancellation events are where TrackLayer can correct that. The conservative approach is to keep the original purchase event for auditability and send a separate cancellation adjustment event with a negative modeled value so downstream optimization and reporting understand that the expected revenue was lost.
if (event === "subscription/cancelled") {
emit("subscription_cancelled", {
subscription_id,
customer_id,
value: -projectedRemainingLtv,
reason: cancel_reason,
destination_event: "MetaCancellationAdjustment",
});
}Churn prediction
Once Recharge lifecycle data is flowing, TrackLayer `/cohorts` becomes more useful than simple top-line renewal reporting. You can segment cohorts by acquisition source, first product, quiz answer cluster, discount depth, and subscription cadence, then compare realized rebills against the modeled value used for bidding. Accounts that skip, pause, or compress order intervals can be marked at risk before they cancel outright.
atRisk =
pause_count > 0 ||
skip_count >= 2 ||
payment_failures >= 1 ||
days_since_last_charge > expected_cycle_days + 7;Common questions
Do skip and pause events matter for attribution?
Yes. They are not purchases, but they are strong retention signals. A skipped charge means revenue shifted in time, while a pause usually means higher churn risk. Feed them into TrackLayer even if only purchase-like events go downstream to ad platforms.
What about build-a-box subscriptions?
Treat the subscription as the recurring contract and the box contents as line-item metadata. The value sent to paid media should usually stay at the subscription charge level, while TrackLayer stores the configurable product composition for analysis and cohort slicing.
Can this work with quiz-first subscription apps such as Gemtracks?
Yes. Quiz outputs should enrich the customer profile before the Recharge subscription is created. TrackLayer can preserve quiz answer segments, funnel source, and plan recommendation while Recharge remains the revenue authority for starts, rebills, skips, and churn.
Is the same pattern valid for Loop Subscriptions?
Yes. Loop is an alternative billing source, not a different measurement problem. The exact webhook names change, but the canonical model stays the same: subscription created, billed, paused, skipped, reactivated, and cancelled with a stable customer and subscription ID.
Can WooCommerce Subscriptions follow the same parallel setup?
Yes. WooCommerce Subscriptions needs the same server-side pattern: billing webhooks or backend hooks into TrackLayer, clear separation of first order versus renewal revenue, and cancellation signals that close the loop on paid media reporting.
Keep the subscription stack coherent
Subscription events
Define the canonical lifecycle vocabulary behind starts, renewals, pauses, and churn.
Read guide →Meta CAPI setup
Route server-side revenue events into Meta with stable event IDs and cleaner match quality.
Read guide →Shopify checkout extensibility
Keep Shopify and post-checkout tracking clean while subscription apps add their own logic.
Read guide →