Skip to main content
The Whop integration connects your Whop account to DATALYR via webhooks, so you can track purchases and memberships and attribute them back to the ads that drove them.

What Gets Tracked

When a payment or membership event occurs in Whop, DATALYR receives the webhook and creates an attribution event.
Whop EventDATALYR EventHas Revenue
payment.succeededpurchaseYes
membership.activatedsubscribeNo
membership.deactivatedmembership_cancelledNo
Payment data captured:
  • Payment ID, total amount, currency
  • User email, user ID
  • Product ID, product title
  • Plan ID, membership ID
  • Billing reason, payment status
Membership data captured:
  • Membership ID, status
  • User email, user ID
  • Product ID, product title
  • Cancel option, cancellation reason (for deactivations)

How Attribution Works

DATALYR uses email-based identity resolution to connect Whop payments to ad clicks:
  1. User clicks your ad and lands on your page with the DATALYR web SDK
  2. User enters their email on your landing page — datalyr.identify({ email }) links the email to the visitor session (which has the ad click data)
  3. User purchases on Whop — Whop sends a payment.succeeded webhook with the customer email
  4. DATALYR matches the email to the original visitor session and retrieves the ad attribution (fbclid, gclid, ttclid, UTMs)
  5. Conversion is sent to your ad platforms with the original click ID
Attribution only works if you call datalyr.identify({ email }) on your landing page before the user reaches Whop checkout. The email must be captured in a DATALYR event first.

Setup

1. Connect Whop in DATALYR

  1. Go to Settings -> Integrations in DATALYR
  2. Click Connect next to Whop
  3. Copy the webhook URL shown in the modal
Your webhook URL format:
https://webhooks.datalyr.com/whop/YOUR_WORKSPACE_ID

2. Configure Webhook in Whop

  1. Go to your Whop Developer Dashboard
  2. Click Create Webhook
  3. Paste the DATALYR webhook URL
  4. Select these events:
    • payment.succeeded
    • membership.activated
    • membership.deactivated
  5. Make sure API version is set to v1
  6. Save the webhook
  7. Copy the signing key (whsec_...) from the webhook

3. Add Signing Secret

  1. Go back to the Whop setup modal in DATALYR
  2. Paste the whsec_... signing key
  3. Click Connect Whop
DATALYR uses the Standard Webhooks (Svix) spec to verify all incoming webhooks. The signing secret ensures no one can send fake events to your webhook URL.

4. Verify Setup

  1. Make a test purchase on your Whop product
  2. Go to DATALYR Dashboard -> Event Stream
  3. You should see a purchase event with source: whop
  4. Check that the value matches the payment amount

Email Capture

For attribution to work, you must capture the user’s email on your own landing page before they go to Whop:
// On your landing page — capture email before Whop checkout
document.getElementById('email-form').addEventListener('submit', function(e) {
  const email = document.getElementById('email').value;
  datalyr.identify({ email: email });
});
If the user is already logged in:
// On page load if user is known
if (currentUser) {
  datalyr.identify({ email: currentUser.email });
}

Dashboard Metrics

Once connected, DATALYR shows these metrics on your dashboard:
MetricDescription
RevenueTotal payment amount from payment.succeeded events
PurchasesCount of successful payments
SubscriptionsCount of new memberships activated
CancellationsCount of memberships deactivated
Average Order ValueRevenue / Purchases
All metrics are available in the main chart, report cards, and can be filtered by date range.

Conversion Rules

Set up conversion rules to send Whop purchase events back to your ad platforms:
  1. Go to Settings -> Conversion Rules -> Add Rule
  2. Select a Whop event as the trigger (e.g., purchase)
  3. Choose your ad platform (Meta, Google, TikTok)
  4. Set the conversion event type (e.g., Purchase)
  5. Save — conversions fire immediately
DATALYR sends the original click ID (fbclid, gclid, ttclid) with the conversion, so your ad platform can attribute the sale back to the exact ad that drove it.

Event Data Structure

Whop webhooks create events with this structure:
{
  "event_name": "purchase",
  "source": "whop",
  "visitor_id": "original_visitor_id",
  "user_id": "[email protected]",
  "fbclid": "original_fbclid",
  "gclid": "original_gclid",
  "value": 99.00,
  "currency": "USD",
  "event_data": {
    "payment_id": "pay_xxx",
    "user_id": "user_xxx",
    "product_id": "prod_xxx",
    "product_title": "Your Product",
    "membership_id": "mem_xxx",
    "billing_reason": "subscription_create"
  }
}

Troubleshooting

Payments not appearing in Event Stream

Check:
  1. Webhook is configured in Whop with the correct URL
  2. API version is set to v1
  3. payment.succeeded event is selected
  4. Signing secret matches between Whop and DATALYR
Test:
  • Make a test purchase and check Event Stream within 1 minute

Payments not attributed (no fbclid/gclid)

Cause: Email was not captured with datalyr.identify() before checkout Fix:
  1. Add datalyr.identify({ email }) on your landing page
  2. Ensure the identify call happens before the user clicks through to Whop
  3. The email used on your landing page must match the Whop account email

Signature verification failed

Cause: Signing secret mismatch Fix:
  1. Go to Whop Developer Dashboard -> your webhook
  2. Copy the signing key (starts with whsec_)
  3. Update the secret in DATALYR Settings -> Integrations -> Whop

Next Steps

Meta Ads Integration

Send Whop conversions to Facebook and Instagram

Google Ads Integration

Track Whop conversions in Google Ads

Conversion Rules

Configure which events fire to ad platforms

Web SDK Setup

Install the tracking SDK on your landing pages