Connect your revenue
How to track Whop sales by traffic source
By Brian Lovett, Founder, theBizness.ai · Updated · 4 min read
To track Whop sales by traffic source, send your marketing to a page on your own site, tag the links with UTM parameters, connect your Whop business to an analytics tool and pass the visitor’s ID into the Whop checkout. Whop is where a lot of creators and small software businesses sell memberships, communities, courses and tools. The marketing that drives those sales usually happens somewhere else: a thread on X, a YouTube video, a TikTok, a Discord announcement, a newsletter. Whop records your payments and members well. What it cannot see is the visit to your own website that happened before the checkout, so it cannot tell you which of those posts actually produced revenue.
Why this is hard to work out by hand
Creators often post the same offer in many places at once. Sales arrive in a cluster, and it is tempting to credit whichever post had the most likes. Engagement and revenue are different things: the video with the most views can produce fewer buyers than a short post to a smaller, warmer audience. Recurring memberships make it harder still, because a buyer who joined in March keeps paying every month with no new click to explain it.
The approach: send traffic through your site
Attribution needs a visit to attribute. The reliable pattern is to point your marketing at a page on your own site, such as a landing or pricing page, and start the Whop checkout from there. Your site can then record where the visitor came from and pass that identity into the checkout. If you link straight from social media to a Whop product page, no visit happens on your site, and there is nothing for any site-based analytics tool to connect the sale to.
Tag the links in each post with UTM parameters, for example utm_source=youtube&utm_medium=video&utm_campaign=course-launch, so channels that send no referrer still show up by name. The free UTM builder makes them for you.
Connecting Whop to theBizness.ai
1. Install the tracking script
Add the script to your site (about 2 minutes) so each visit’s referrer and UTM tags are recorded with a first-party visitor ID. See the installation guide.
2. Create a Whop API key
In your Whop dashboard, open Developer and create an API key with these permissions:
- Create our webhook:
developer:manage_webhook - Receive sales, refunds and cancellations:
webhook_receive:payments,webhook_receive:refunds,webhook_receive:memberships - Read what those events contain:
payment:basic:read,payment:dispute:read,payment:resolution_center_case:read,plan:basic:read,access_pass:basic:read,member:basic:read,member:email:read,member:phone:read,promo_code:basic:read,shipment:basic:read
Copy your business ID too; it starts with biz_ and appears in your Whop dashboard address.
3. Connect it on the Setup page
Paste the business ID and key into the Whop card. theBizness.ai creates a webhook in your Whop business, and the key is stored encrypted and never shown again. Disconnecting later removes that webhook and keeps the revenue already recorded.
4. Pass the visitor into the checkout
When your server creates the Whop checkout, include your website ID and the visitor and session IDs from the two first-party cookies the script sets:
await whop.checkoutConfigurations.create({
plan_id: "plan_...",
metadata: {
websiteId: "<your website id>",
visitorId: cookies.get("thebizness_visitor_id"),
sessionId: cookies.get("thebizness_session_id"),
},
});Without these IDs a payment is still recorded, and it is attributed through the buyer’s earlier purchases on your site where there are any. Adding the IDs takes about 10 minutes, or you can paste a ready-made prompt into your AI coding agent. If more than one of your websites uses the same Whop business, the websiteId is required, otherwise the sale is skipped for websites it was not meant for.
What gets recorded
- Payments are recorded as verified revenue, as a new sale or as a renewal of an existing membership, and credited to the source of the visit that led to them.
- Renewals stay with the channel that won the member, so a creator can see the lifetime value of each channel, not just its first month.
- Refunds are recorded against the original sale.
- Cancellations, including memberships set to cancel at the end of the period, appear on the Cancellations page with what those customers had paid in total.
On the dashboard, Whop revenue sits alongside any Stripe revenue in the same reports: revenue, orders, conversion rate and revenue per visitor by source, medium and campaign, plus each customer’s path to purchase. Credit goes to the most recent visit with a source in the 30 days before the sale (an upper limit; Safari and Brave shorten it).
Reading the results
After a few weeks, compare channels by revenue per visitor rather than by views or clicks. A smaller audience that buys and keeps paying is worth more than a large one that only watches. If a channel brings many members who cancel after one cycle, it will show up in its renewals and cancellations, which is exactly the signal engagement metrics hide. The revenue per visitor guide explains how to read the comparison, and pricing starts with a 14-day free trial.
See which channels bring paying customers
theBizness.ai connects your traffic to Stripe and Whop revenue, so you can put your budget where it earns. See the features and pricing, or start with the installation guide.
Start 14-day free trialGo to dashboardChoose a plan14-day free trial. No card required.