Skip to main content

Guide for Event Tracking & Data Integration: Stripe, Meta, and Webhooks

L
Written by Leanid Yuryeu
Updated over a week ago
  1. Which events should be sent to the Meta Conversion API, and what Stripe triggers are used for these events?

We send all Stripe events to the Meta Pixel as custom events. Additionally, we map specific Stripe events to standard Meta Pixel events to improve campaign optimization. Below is the breakdown of these mappings:

Stripe Event

Meta Pixel Event

customer.subscription.created (trialing)

StartTrial

customer.subscription.created (active)

Subscribe

customer.subscription.updated (trial → active)

Subscribe

invoice.paid

Purchase

payment_intent.succeeded (no invoice)

Purchase

By sending these events, we ensure that Meta’s algorithms receive the right signals to optimize ad delivery for conversions, subscriptions, and purchases.

Let us know if you need further clarification on event mappings!

2. Do you automatically include value and currency in Purchase and StartTrial events? How are these values determined?

A: Yes, we automatically include both value (amount) and currency in Purchase and StartTrial events.

These values are pulled directly from the original Stripe event—not manually assigned—to ensure accuracy. The system uses a fallback approach to determine the correct amount, checking multiple Stripe fields in sequence:

Stripe Field Used

When It Applies

price.unit_amount

For subscription items

amount_total

From Checkout Sessions

invoice.amount_paid

From invoices

amount_received

From successful payments

amount_paid

Final fallback if other fields are missing

Additional Notes:

  • The amount is converted from cents to a decimal (e.g., 2999"29.99").

  • The currency is taken as-is from Stripe (e.g., "usd", "eur").

As we do not override values manually—the value is always derived from Stripe’s data. Here’s how it works:

  • If Stripe includes an associated amount (e.g., from a price object or Checkout Session), we forward that amount, even for free trials.

  • If no value is available in the Stripe event (e.g., a completely free trial with no linked price), the value field is omitted entirely.

3. Receiving events data from Onboarding to Google Sheets

  • How to interpret the integer answers I receive in my Google Sheets from quiz webhooks?

A: The integers represent different types of selections depending on the screen type:

For Table/Quiz Screens:

  • You'll see comma-separated numbers (e.g., "1,3,5")

  • These are index positions (starting from 0) of the selected options

  • Example: "0,2" means the user selected the 1st and 3rd options

For Paywall Screens:

  • You'll see comma-separated true/false values (e.g., "false,true,false")

  • Each position represents an available option

  • Only the selected option shows as "true"

  • Example: "false,true,false" means the 2nd option was chosen

  • How to receive the actual text values instead of numbers/booleans?

A: Currently, you can access the text values through these methods:

  • Using customData Container (for redirect URLs):

window.customEventTracker = (event, args) => { if (event === 'UserUpdatedValue' && args.buttonTitle) { window.customUserData[args.screenId] = args.buttonTitle; // Table selections } if (event === 'ProductSelected' && args.productId) { window.customUserData[args.screenId] = args.productId; // Product selections } };
  • Custom Analytics Solution (for immediate sending):

window.customEventTracker = (event, args) => { // [Same tracking code as above] if (event === 'ScreenDisappeared') { // Add your Google Sheets integration here } };

Note: Webhook support for text values is coming in the next release.

Q: How can I use these text values right now?

A: Two options:

  1. For Redirect URLs:

    • Add custom keys in "Custom parameters"

    • Reference them in "ScreenDisappeared" redirects

  2. Custom Implementation:

    • Use the JavaScript above to send data directly to your endpoint

    • Works immediately while waiting for webhook support

Did this answer your question?