Most web analytics tools tell you where your traffic comes from, but they stop short when it comes to the only metric that truly matters: revenue.
When a visitor clicks an ad on Twitter or discovers your product on GitHub, traditional analytics records a pageview. But when that same visitor pays $49 a week later through Stripe or Polar, your analytics is completely blind.
The Problem with Traditional Pageview Metrics#
Traditional analytics tools optimize for pageviews, bounce rates, and session durations. While these metrics look nice on an investor update deck, they frequently mislead growth teams:
- High Traffic, Low Intent: A blog post ranking for generic keywords might bring 50,000 visitors per month while generating $0 in subscription revenue.
- Low Traffic, High Value: A technical comparison page or developer docs page might receive only 200 visits a month but drive $12,000 in monthly recurring revenue (MRR).
- Misallocated Ad Spend: Ad channels with low cost-per-click often attract unqualified leads who never convert past the free trial.
Average revenue recovered after switching from raw pageview attribution to unified server-side payment attribution.
Connecting Stripe and Polar to Eleven#
Connecting your payment provider is straightforward and requires zero complex database engineering. Eleven handles webhooks and securely links customer sessions.
Setting up the JavaScript Client SDK#
First, install the Eleven lightweight tracking snippet in your application root:
import { initEleven } from "@eleven/analytics";export const analytics = initEleven({ projectId: process.env.NEXT_PUBLIC_ELEVEN_ID, cookieless: true, autoTrackOutbound: true,});Passing the Checkout Session Identifier#
When initiating a Stripe Checkout session or Polar purchase, simply attach the client session token to your payment metadata:
// pages/api/create-checkout-session.tsimport Stripe from "stripe";const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);export async function createCheckout(req, res) { const { visitorId, priceId } = req.body; const session = await stripe.checkout.sessions.create({ payment_method_types: ["card"], line_items: [{ price: priceId, quantity: 1 }], mode: "subscription", metadata: { eleven_visitor_id: visitorId, }, success_url: `${process.env.NEXT_PUBLIC_URL}/success`, cancel_url: `${process.env.NEXT_PUBLIC_URL}/pricing`, }); return res.json({ url: session.url });}checkout.session.completed and invoice.payment_succeeded events, matching the payment amount directly to the referrer URL and UTM campaign.Understanding Multi-Touch Attribution Models#
When evaluating customer journeys, different attribution models provide unique insights into your acquisition funnel:
| Model | Best For | Key Advantage |
|---|---|---|
| First Touch | Top of funnel campaigns | Identifies original discovery channels |
| Last Touch | Direct conversion pages | Highlights final trigger before purchase |
| Linear Multi-Touch | Full lifecycle evaluation | Gives equal credit across entire journey |
| Time-Decayed | Sales cycles > 30 days | Gives progressive credit to closer interactions |
Conclusion#
When revenue is placed directly next to your traffic sources, marketing decisions become crystal clear. You stop guessing which campaigns work and start doubling down on the channels that genuinely drive sustainable revenue.
Start Tracking True Revenue Today
Connect Stripe, Polar, or Paddle in less than 3 minutes. Zero cookie banners required.