Before you start
You need access to the product’s frontend and backend, the Stripe account used by the product, and a Stripe test environment. Decide which lifecycle event represents a new customer and whether trials or signups should also be sent as conversions.1. Track the acquisition journey
Install web tracking before paid traffic reaches the pricing or signup pages. Verify a pageview with campaign properties, then track only the product milestones you use, such as signup completed or trial started.2. Identify the account
After signup, identify the visitor with your stable application user ID:reset() on logout or account switching so the next user’s events are not attached to the previous account.
3. Connect Stripe
Open Sources → Stripe and complete Stripe Apps OAuth for the correct account. This connection supplies the authoritative payment lifecycle; a separate manual Stripe webhook is not required for the standard integration.4. Bridge the visitor into checkout
Calldatalyr.getStripeMetadata() when checkout begins:
- For Checkout Sessions, pass the returned
client_reference_idand metadata. - For PaymentIntents and Subscriptions, include
metadata.visitor_idwhen the server creates the object. - Supported Stripe Payment Links on
buy.stripe.comcan be decorated by the current Web SDK when that feature is enabled.
5. Verify the lifecycle
Complete a Stripe test checkout and confirm the first visit, signup, checkout, and payment appear on the same customer journey. Check value, currency, Stripe customer ID, and transaction or subscription identifiers. Then test a renewal, refund, or cancellation and confirm it remains associated with that customer.6. Configure conversions
Connect the acquisition platforms and create separate rules only for lifecycle events you intentionally optimize toward. A signup, trial, and first paid subscription answer different questions. Do not report every recurring invoice as a new-customer conversion unless that is explicitly desired.Common problems
- The payment is unattributed: visitor metadata was omitted when the Stripe object was created.
- The wrong customer is attached: identity was not reset during account switching.
- Payment Links lose attribution: the link was rendered before the SDK initialized or uses an unsupported flow.
- New customers are overcounted: renewal invoices are included in the acquisition conversion rule.
- Test payments are absent: the connected Stripe account or environment does not match the test.