Stripe Integration
How to track Stripe payments link integration with Anytrack.
The Stripe integration overview:
- When a visitor lands on your website, AnyTrack identifies the user and its first party data.
- AnyTrack AutoTag the Stripe payment link with the required tracking data.
- When the purchase is completed, AnyTrack receives the 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--
AutoTagWhen AnyTrack loads on your web page, it will substitute the placeholder
--CLICK-ID--with a clickid.π You can Hover on this link to see it.
- 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
- Action
- Webhook POST
- Paste the AnyTrack webhook
- Map the events and Event Attributes
- Test, Save, Publish
If you want to use the Webhook function within Stripe, select thecheckout.session.completed event and map the event parameters to AnyTrack Event Attributes.
Pay attention!Stripe sends webhook data in cents so you need to multiply the amount by 100 before sending it to AnyTrack.
π Data Mapping Between Stripe and AnyTrack
π§© Prerequisites
Before setting up data mapping, ensure the following:
- Stripe Payment Link: The link includes
?client_reference_id=--CLICK-ID--. - AnyTrack Pixel Installed: The tracking script runs on your website.
- Reference ID Parameter: The
client_reference_idparameter contains the AnyTrack clickid.
βοΈ Flow Overview
- Visitor clicks a Stripe link tagged with AnyTrackβs clickid.
- After successful payment, Stripe triggers a webhook or Zap.
- The webhook sends mapped data (including the clickid 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. To send event data to AnyTrack, you must use an intermediary automation service like Zapier, Make, or any custom webhook provider capable of formatting and forwarding the payload correctly.
β
Expected Outcome
Once configured:
- Stripe payments trigger conversions in AnyTrack.
- Each conversion is linked to the correct visitor and campaign.
- Conversions automatically forward to your 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 15 days ago
