Stripe Integration
Learn how to integrate Stripe with AnyTrack for e-commerce conversion tracking. Set up payment event tracking, configure postback URLs, and enable accurate ROAS attribution for your campaigns.
Stripe Integration Overview
- When a visitor lands on your website, AnyTrack identifies the user and first-party data
- AnyTrack autotags the Stripe payment link with required tracking data
- When purchase completes, AnyTrack receives conversion data via webhook integration
Stripe Payment Link Tracking
- Append the
?client_reference_id=--CLICK-ID--to your payment link.
https://buy.stripe.com/test_00g6qSh021cG5gc8ww?client_reference_id=--CLICK-ID--When AnyTrack loads on your web page, it substitutes the placeholder --CLICK-ID-- with a unique click ID.
- Save your page and test the link to see if the parameter is appended to the link.
Stripe Conversion Tracking Setup
- Create a custom integration in AnyTrack
- Open your Zapier or Make account
- Create a new Zap:
- App: Stripe
- Event: Checkout Session Completed
- Configure the action:
- Webhook POST
- Paste the AnyTrack webhook
- Map the events and Event Attributes
- Test, save, and publish
Alternatively, use the Webhook function within Stripe, select the checkout.session.completed event, and map the event parameters to AnyTrack Event Attributes.
Stripe sends webhook data in cents. Multiply the amount by 100 before sending it to AnyTrack.
Data Mapping Between Stripe and AnyTrack
Prerequisites
Before setting up data mapping, ensure:
- Stripe Payment Link includes
?client_reference_id=--CLICK-ID-- - AnyTrack Pixel/Tag installed and running on your website
- The
client_reference_idparameter contains the AnyTrack click ID
Flow Overview
- Visitor clicks a Stripe link tagged with AnyTrack's click ID
- After successful payment, Stripe triggers a webhook or Zap
- The webhook sends mapped data (including click ID and transaction info) to AnyTrack
Zapier Integration Setup
Step 1: Trigger
- App: Stripe
- Event:
Checkout Session Completed
Step 2: Format Value
- App: Formatter by Zapier
- Action: Numbers → “Perform Math Operation”
- Formula:
{{amount_total}} / 100(convert cents to dollars)
Step 3: Webhook POST to AnyTrack
- App: Webhooks by Zapier
- Action: POST
- URL: AnyTrack Webhook endpoint (from your Custom Integration setup)
- Payload Type: JSON
Field Mapping Example:
| Stripe Field | AnyTrack Field | Description |
|---|---|---|
client_reference_id | clickid | Links conversion to the AnyTrack visitor |
amount_total / 100 | value | Purchase amount (converted to dollars) |
currency | currency | ISO currency code (e.g., USD) |
customer_details.email | email | Customer email (optional) |
payment_status | status | Payment status (e.g., paid) |
id | transaction_id | Stripe’s transaction ID |
Important Note
You cannot map event attributes directly through Stripe's native webhook. Use an intermediary automation service like Zapier or Make that can format and forward the payload correctly.
Expected Outcome
Once configured:
- Stripe payments trigger conversions in AnyTrack
- Each conversion links to the correct visitor and campaign
- Conversions automatically forward to connected ad platforms
The Webhook Payload Example:
{
"request": {"idempotency_key": null,"id": null},
"data": {"object": {"client_reference_id": "p8qkMansHXKGTX9GmPTbMJ6GmSjTf4mUys","amount_total": 10000,"currency": "usd","payment_status": "paid","customer_details": {"email": "[email protected]"},"id": "evt_1M5sv6JhmZq84NMqbCfCcgRL"}},
"type": "checkout.session.completed"
}Updated 3 days ago
