party-popper

Trackflow is in Beta. Take advantage of our pre-launch pricing!

Trackflow

Revenue Attribution

Trackflow automatically tracks and attributes your revenue to the right marketing channels.

1. Connect your Payment Provider

Go to your website settings in Trackflow and follow the instructions to connect your Stripe account.

https://www.trackflow.dev

2. Pass Metadata during Checkout

Pass metadata with trackflow_visitor_id and trackflow_session_id (cookies from Trackflow) when creating a checkout session:

// app/api/create-checkout/route.js
import { cookies } from 'next/headers';

const session = await stripe.checkout.sessions.create({
  line_items: [...],
  mode: 'payment',
  metadata: {
    trackflow_visitor_id: cookies().get('trackflow_visitor_id')?.value || '',
    trackflow_session_id: cookies().get('trackflow_session_id')?.value || ''
  },
});

Trackflow automatically tracks revenue when these metadata fields are present in your Stripe checkout sessions.

How It Works

Trackflow uses two cookies to track revenue attribution:

  • trackflow_visitor_id - Identifies unique visitors
  • trackflow_session_id - Tracks the current session

Testing

To verify your implementation:

  1. Create a test checkout session in Stripe
  2. Verify the metadata contains both Trackflow IDs
  3. Complete a test purchase
  4. Check your dashboard for the attributed revenue

Need more help?

Can't find what you're looking for in our documentation? Our support team is here to help you.