CREEM × DataFast

Track revenue attribution automatically with CREEM × DataFast

No glue code. No manual tracking. Just install and go.

View GitHub

Auto-captures datafast_visitor_id-> sends revenue events -> done.

Quick trace

One click. Full revenue attribution.

Visitor IDpending
CheckoutPreparing
RevenueWaiting
Preparing
How it works

From first visit to attributed revenue.

Visitor lands -> cookie captured -> checkout -> webhook -> DataFast gets revenue

01

Visitor tracked

Reads `datafast_visitor_id` from the cookie.

02

Checkout

Injects it into CREEM metadata automatically.

03

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.

Pricing card

Demo Product

$40.00

Preparing attribution before checkout opens.

Trace view

What updates after the purchase

Visitor IDpending
CheckoutPreparing attribution
WebhookWaiting
DataFastWaiting for purchase
Tracking status

Tracking is warming up.

The page is initializing DataFast and preparing checkout attribution.

Preparing
Visitor IDWaiting
Session IDWaiting
Domainlocalhost
Event proxy/api/events
Revenue feed

Recent payment events

Waiting for purchase
Visitor IDpending
Session IDpending
Domainpending
Event proxy/api/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.