CREEM × DataFast
Track revenue attribution automatically with CREEM × DataFast
No glue code. No manual tracking. Just install and go.
Auto-captures datafast_visitor_id-> sends revenue events -> done.
How it works
From first visit to attributed revenue.
Visitor lands -> cookie captured -> checkout -> webhook -> DataFast gets revenue
Visitor tracked
Reads `datafast_visitor_id` from the cookie.
Checkout
Injects it into CREEM metadata automatically.
Attribution
Webhook sends the payment event to the DataFast API.
const checkout = await creemDataFast.createCheckout(
{ productId: "pro_plan" },
{ request },
)Live demo
Run the checkout and watch the proof update.
Demo Product
$40.00
Preparing attribution before checkout opens.
What updates after the purchase
Tracking status
PreparingTracking is warming up.
The page is initializing DataFast and preparing checkout attribution.
Revenue feed
Waiting for purchaseRecent payment events
No payment events yet. Complete a checkout to populate this feed.
What's happening under the hood
A small package surface, not a pile of glue code.
- `createCheckout(...)` resolves DataFast tracking from the request.
- Tracking is merged into CREEM metadata without losing your own metadata.
- `createNextWebhookHandler(...)` and `createExpressWebhookHandler(...)` are built in.
- The same package also ships `/client` and `/react` helpers for browser flows.
import { createNextWebhookHandler } from "@itzsudhan/creem-datafast/next";
export const POST = createNextWebhookHandler(creemDataFast);Framework examples
Small enough to scan in one pass.
export async function POST(request: Request) {
const checkout = await creemDataFast.createCheckout(
{ productId: process.env.CREEM_PRODUCT_ID! },
{ request },
);
return Response.redirect(checkout.checkoutUrl!, 303);
}Install
Install it and start fast.
pnpm add @itzsudhan/creem-datafast
import { createCreemDataFast } from "@itzsudhan/creem-datafast"Why this exists
Payments are not analytics. This closes the gap.
- Attribution usually breaks between payments and analytics.
- Revenue events should not require manual glue code.
- This keeps checkout and attribution in one clean layer.