How to Track Conversions Without Cookies: A Practical Guide
Skip the third-party pixels. Track signups, paid conversions, and source attribution with one script tag and one identify call.
The conventional conversion-tracking stack — Google Ads pixel, Facebook Pixel, GA4 conversion events — leans on cookies that increasingly require consent and increasingly get blocked anyway. The good news: cookie-free conversion tracking covers everything most SaaS teams actually use, and the implementation is shorter than the GDPR paperwork.
This article walks through what a cookie-free conversion stack looks like, what it can and can't do, and the exact code to ship it.
What "conversion" actually means here
Before tracking anything, separate three things that get collapsed into the word "conversion":
- Micro conversions: Email signup, demo request, pricing-page click, file download. Cheap to fire, useful as funnel signals.
- Macro conversions: Account creation, trial started, plan selected. The events you care about most as a SaaS founder.
- Revenue conversions: First paid charge, plan upgrade, expansion revenue. The only conversion that affects bank balance.
Cookie-free tracking handles all three, but the implementation differs slightly for each. Revenue conversions specifically require a server-side step — keep reading.
The 30-second mental model
A cookie-free conversion is just a regular event that happens to mean something to you. The analytics tool doesn't need to know which events are conversions ahead of time — you fire them like any other event, and tag a few as conversions in the dashboard.
The hard part is making sure each event can be attributed back to a traffic source. That part is automatic for client-side events but requires a deliberate step for server-side ones (revenue), which we'll cover.
Step 1: Install the cookie-free tracker
The base script handles pageviews automatically and exposes a datibase() queue for custom events. One tag in your <head>:
<script async
src="https://datibase.dev/api/tracker/<code>"
></script>For a Next.js install with next/script, see the Next.js setup guide.
Step 2: Fire micro and macro conversions client-side
Anything the visitor does in the browser is a one-line call. The first argument is the literal "event" (drop it and the call silently no-ops):
// in your signup component
const handleSignup = async (data) => {
await createAccount(data);
window.datibase?.("event", "signup", { plan: data.plan });
router.push("/onboarding");
};The event arrives at your dashboard with the visitor's referrer source already attached (it was captured on landing). Fire one for each conversion you care about: trial start, demo request, pricing-page-to-signup click, etc.
Step 3: Fire revenue conversions server-side
Client-side revenue events are unreliable: ad blockers eat them, users close the tab before they fire, and frankly any data that affects pricing should not trust the browser. The right answer is a webhook from your payment processor.
Two approaches, depending on how much plumbing you want to write:
// approach a — wire it yourself
Stripe webhook → your API → analytics event
Subscribe to Stripe's invoice.paid webhook, look up the customer in your DB, find the visitor session that signed them up, fire a server-side event to your analytics tool. Works with any analytics tool. Roughly half a day of work plus ongoing maintenance whenever the webhook payload changes.
// approach b — native integration
Connect Stripe in the dashboard, fire one identify call
Datibase connects to Stripe (or Polar) in settings. After login, you call datibase.identify({ customerId }) once with the Stripe customer ID — that single line links the browser session to the eventual revenue. Webhooks, attribution, and joining are handled server-side.
// approach b — the only line of code required
window.datibase?.identify({ customerId: stripeCustomerId });The full background on why this matters and the longer plumbing version is in our Stripe revenue + traffic guide.
Step 4: UTM parameters (briefly)
UTMs are still the lingua franca of campaign tracking. Cookie-free analytics handles them out of the box: when a visitor lands on example.com/?utm_source=twitter&utm_campaign=launch, the source and campaign are captured with the pageview and carried forward to any conversion event in the same session.
What you don't get for free: cross-session UTM attribution. If a visitor sees your tweet on Monday, comes back direct on Friday, and converts, the conversion is attributed to direct, not Twitter. This is the deliberate trade-off of cookie-free tracking — see Cookieless Tracking Explained for the why.
What about Google Ads conversion tracking?
Google Ads conversion tracking via the gtag pixel does require cookies and consent. If you run paid Google traffic, you have three options:
- Switch to Enhanced Conversions: Google's server-side conversion API. You hash and forward customer data from your backend instead of relying on a browser cookie. Privacy-friendlier and reasonably accurate, but still requires a privacy policy update.
- Gate the gtag conversion pixel behind consent: Show a consent prompt only to ad-driven traffic, fire the pixel only on opt-in. Most teams find this acceptable since the audience expecting tracking arrived from a paid ad in the first place.
- Accept the attribution gap: Run paid ads, accept that 20–40% of conversions won't attribute back to Google, and use referrer + UTM data for your own measurement. For low-spend channels this is the cleanest answer.
What you give up vs the old pixel-heavy stack
- Cross-device user journeys: If a user reads your blog on phone and signs up on laptop, the two sessions can't be linked without a login. Acceptable trade for most SaaS.
- Multi-day attribution: Conversions across a week or more lose their first-touch source. The first-touch will be 'direct' more often than it really should be.
- Retargeting audiences: Building a Facebook retargeting audience requires Facebook's pixel. If retargeting is core to your funnel, you'll keep the pixel and gate it behind consent.
The bottom line
Cookie-free conversion tracking covers signups, trial starts, plan choices, and revenue attribution by source — the metrics most SaaS teams actually use to make decisions. The trade-offs are real (cross-device, long multi-day funnels, retargeting pixels) but smaller than they sound, and the legal upside — dropping the cookie banner — is large.
For most indie founders, the practical setup is one script tag, a handful of datibase("event", ...) calls in the codebase, and one identify call after login. That covers 90% of conversion-tracking needs.
Track conversions without the cookie tax
Datibase covers signups, custom events, and revenue attribution by source — without cookies, banners, or webhook plumbing.
Try Datibase free