ClickFunnels Webhooks
Connect ClickFunnels webhooks to automatically track funnel orders and subscriptions as conversion events. DATALYR matches customers to their original ad click using email-based identity resolution.What You’ll Learn
- How to configure ClickFunnels webhooks
- Supported ClickFunnels events
- Email attribution matching
- Testing and verification
Before You Start
- DATALYR tracking script installed on your funnel pages
- Email capture with
datalyr.identify({ email })before checkout - Admin access to ClickFunnels account
- Active workspace in DATALYR
Supported Events
DATALYR processes these ClickFunnels webhook events:| ClickFunnels Event | DATALYR Event | Description |
|---|---|---|
order.completed | purchase | Order completed in funnel |
order.created | purchase | New order created |
subscription.created | subscribe | Subscription started |
subscription.activated | subscribe | Subscription activated |
How Attribution Works
When a customer completes a ClickFunnels order:- ClickFunnels sends webhook with contact email to DATALYR
- DATALYR queries events table: “Find visitor_id where email matches”
- DATALYR retrieves original attribution (fbclid, gclid, UTMs)
- Event is created with
source: 'clickfunnels'and attribution data - Conversion rules fire postbacks to Meta, Google, TikTok
Attribution only works if you call
datalyr.identify({ email }) before the customer reaches the order form. The email must be captured in a DATALYR event first.Step 1: Get Webhook URL
- Log in to DATALYR dashboard
- Navigate to Sources tab
- Click Webhooks tab
- Click ClickFunnels card
- Copy your webhook URL
Step 2: Configure ClickFunnels Webhook
ClickFunnels Classic
- Log in to ClickFunnels
- Navigate to Account Settings → Integrations → Webhooks
- Click Add New Webhook
- Configure webhook:
- Name: DATALYR Attribution
- URL: Your DATALYR webhook URL
- Events: Select order and subscription events
- Click Save
ClickFunnels 2.0
- Log in to ClickFunnels 2.0
- Navigate to Settings → Webhooks
- Click Create Webhook
- Configure webhook:
- Name: DATALYR Attribution
- Endpoint URL: Your DATALYR webhook URL
- Events to Listen: Select all order and subscription events
- Click Create Webhook
Select Events
Choose these events to listen to:order.completedororder.createdsubscription.createdorsubscription.activated
Step 3: Verify Setup
Test with Live Order
- Visit your funnel with ad parameters:
yourfunnel.com?fbclid=test123 - Fill out email form and call
datalyr.identify({ email: '[email protected]' }) - Complete order with the same email
- Check DATALYR Event Stream
- A
purchaseorsubscribeevent withsource: 'clickfunnels' - Attribution data (fbclid, visitor_id) from original session
- Event value matching order total
Check Webhook Delivery
In ClickFunnels:- Navigate to webhook settings
- View webhook delivery logs
- Verify recent deliveries show 200 OK status
Step 4: Create Conversion Rules
After verifying webhook events are created, set up conversion rules to fire events to ad platforms.Example: Meta Purchase Event
- Navigate to Integrations → Conversion Rules
- Click Create Rule
- Configure rule:
- Event Name:
purchase - Event Source:
clickfunnels
- Platform: Meta Ads
- Event Type:
Purchase
- Use event value from webhook
Event Data Structure
ClickFunnels webhooks create events with this structure:Attribution Match Rate
DATALYR’s email-based attribution achieves:- 95%+ match rate when email is captured before order form
- 90%+ match rate for cross-device (mobile ad → desktop purchase)
- 85%+ match rate for 30+ day attribution windows
Maximize Match Rate
Capture email early in the funnel:Value Calculation
DATALYR automatically converts ClickFunnels amounts:- Orders:
total / 100oramount / 100(ClickFunnels uses cents) - Subscriptions:
recurring_amount / 100oramount / 100
Deduplication
ClickFunnels may send the same webhook multiple times (retries). DATALYR uses Cloudflare KV to deduplicate:- Extract
event.idfrom webhook - Check if
workspace_id:event_idexists in KV - If exists, return 200 OK but skip processing
- If new, process and store in KV
Security
DATALYR validates all ClickFunnels webhooks by:- Verifying event structure matches expected format
- Checking required fields are present
- Rejecting malformed requests with 400 Bad Request
Troubleshooting
Events have no attribution data
Symptoms: ClickFunnels events appear in Event Stream but fbclid/gclid are null Cause: Email was not captured withdatalyr.identify() before order
Solution:
- Add
datalyr.identify({ email })to email opt-in forms - Add custom JS to ClickFunnels pages to call identify
- Ensure identify call happens before order form submission
- Test by checking Event Stream for identify events with the same visitor_id
Webhooks not appearing in Event Stream
Symptoms: ClickFunnels order completes but no event in DATALYR Cause: Webhook URL not configured correctly Solution:- Check ClickFunnels webhook settings → verify endpoint URL is correct
- Ensure all required events are selected
- Check webhook delivery logs in ClickFunnels for errors
- Test with a new order
Wrong event value
Symptoms: Event value in DATALYR doesn’t match order total Cause: Currency conversion or order structure Solution:- Check
event_data.totalin Event Stream - Verify currency is USD (ClickFunnels default)
- Check if order includes multiple products
- Contact support if amounts are incorrect
DATALYR tracking not working in funnels
Symptoms: No events captured at all from ClickFunnels pages Cause: DATALYR tracking script not installed on funnel pages Solution:- Add DATALYR tracking script to ClickFunnels funnel settings
- Navigate to Settings → Tracking Code → Head Tracking Code
- Paste your DATALYR tracking script
- Test by visiting funnel and checking Event Stream
Installing DATALYR on ClickFunnels
To enable email-based attribution, install DATALYR tracking on your funnels:ClickFunnels Classic
- Navigate to funnel settings
- Click Settings → Tracking Code
- Paste DATALYR script in Head Tracking Code
- Save changes
ClickFunnels 2.0
- Navigate to funnel settings
- Click Settings → Custom Code
- Paste DATALYR script in Header Code
- Save changes
Verify Installation
- Visit your funnel with ad parameters:
yourfunnel.com?fbclid=test123 - Check DATALYR Event Stream
- You should see a
$page_viewevent with fbclid
What Happens Next
After webhook events are created:- Postback Worker checks for matching conversion rules
- Rules filtered by
trigger_event_source: 'clickfunnels' - Conversions fire to Meta, Google, TikTok with original attribution
- Ad platforms receive events with fbclid/gclid for optimization