Webhook Attribution
Connect your payment platform webhooks to automatically send conversion events to Meta, Google, and TikTok Ads. DATALYR uses email-based identity resolution to match purchases back to the original ad click, even when customers complete purchases hours or days later.What You’ll Learn
- How webhook attribution works
- Difference between webhook attribution and revenue analytics
- Supported platforms and events
- Email-based identity resolution
How It Works
Webhook attribution connects your payment platform to DATALYR’s conversion tracking system. When a customer makes a purchase, DATALYR automatically fires conversion events to your connected ad platforms.The Flow
Email-Based Identity Resolution
Webhooks only contain purchase data and customer email. DATALYR uses email to find the original ad click attribution stored in your events table. The system queries Tinybird to find the most recent event where:- The email matches (via
user_idor identify traits) - Attribution data exists (fbclid, gclid, or ttclid)
- Event belongs to your workspace
- 95%+ when email is captured before checkout via
datalyr.identify() - 90%+ for cross-device journeys (mobile ad, desktop purchase)
- 85%+ for long sales cycles (30+ day attribution windows)
- 0% if email was never captured with
datalyr.identify()
Webhook Attribution vs Revenue Analytics
DATALYR offers two types of integrations for platforms like Stripe:Webhook Attribution (This Feature)
Purpose: Real-time conversion tracking for ad platforms Setup: Configure webhook URL in payment platform Data Flow: Payment platform → DATALYR → Ad platforms What You Get:- Automatic conversion events sent to Meta, Google, TikTok
- Email-based attribution matching
- Real-time postback firing
- No OAuth required
Revenue Analytics
Purpose: Dashboard metrics and business analytics Setup: OAuth connection with API access Data Flow: DATALYR polls API → Tinybird → Dashboard What You Get:- MRR, ARR, churn rate calculations
- Revenue charts and trends
- Customer lifetime value
- Subscription analytics
Supported Platforms
Stripe
Track checkouts and subscriptions
Whop
Track payments and memberships
ClickFunnels
Track funnel orders and subscriptions
Events Created
Each platform creates standardized events that trigger conversion rules: Stripe:purchase- From checkout.session.completedsubscribe- From customer.subscription.created
purchase- From payment.succeededsubscribe- From membership.went_valid
purchase- From order.completedsubscribe- From subscription.created
How Conversion Rules Work
Once webhook events are created withsource: 'stripe', source: 'whop', or source: 'clickfunnels', your conversion rules automatically filter by event source.
For example:
- Stripe purchase rule:
event_name = 'purchase' AND source = 'stripe'→ Fires MetaPurchase - Whop purchase rule:
event_name = 'purchase' AND source = 'whop'→ Fires MetaSubscribe
Before You Start
DATALYR tracking script installed on your website
Email capture implemented with
datalyr.identify({ email })Admin access to your payment platform
Active workspace in DATALYR
Setup Process
- Navigate to Sources tab in DATALYR dashboard
- Click “Webhooks” tab
- Select your payment platform (Stripe, Whop, or ClickFunnels)
- Copy the webhook URL provided
- Configure webhook in your payment platform
- Create conversion rules to fire events to ad platforms
Attribution Quality
To maximize attribution match rates:Capture Email Early
Calldatalyr.identify() as soon as you have the user’s email:
Verify Tracking
Check that tracking is working before purchase:- Visit your site with ad parameters:
yoursite.com?fbclid=test123 - Call
datalyr.identify({ email: '[email protected]' }) - Check Event Stream - you should see both events with the same visitor_id
Test Webhooks
After configuring webhooks:- Make a test purchase with the email you used in step 2
- Check Event Stream for a
purchaseevent with source matching your platform - Verify the event has attribution data (fbclid, gclid)
- Confirm conversion rules fire to ad platforms
Deduplication
DATALYR automatically deduplicates webhook events using Cloudflare KV storage. Each webhook event ID is checked before processing. Duplicate webhooks (common with retries) are ignored to prevent double-counting conversions.Security
Webhooks are verified using signature validation:- Stripe: Verifies
Stripe-Signatureheader - Whop: Verifies
X-Whop-Signatureheader - ClickFunnels: Validates event structure
Troubleshooting
No attribution data on webhook events
Cause: Email was not captured before purchase Solution: Implementdatalyr.identify({ email }) on email capture forms
Webhook events not appearing
Cause: Webhook URL not configured or signature verification failing Solution: Check webhook configuration in payment platform settingsConversions firing to wrong platform
Cause: Conversion rule not filtering by event source Solution: Edit rule to includetrigger_event_source filter