Setting up web analytics used to mean one of two things: install Google Analytics and deal with cookie consent banners, or switch to a privacy-friendly alternative and lose revenue data entirely.
EngageTrack is built on the premise that this is a false trade-off. You can have clean, GDPR-compliant analytics and know exactly which marketing channels drive paying customers. This guide walks you through setup from scratch.
What You Get (And What You Don't Track)
Before installing anything, it helps to understand what EngageTrack does and doesn't collect.
What EngageTrack tracks:
- Pageviews, sessions, bounce rate, session duration
- Traffic sources — referrer, UTM parameters, channel (organic, direct, social, paid)
- Entry and exit pages
- Device, browser, OS, country
- Revenue per traffic source (when a payment provider is connected)
- Custom events via the JavaScript API
What EngageTrack never collects:
- IP addresses (used only to derive an anonymized daily hash, then discarded)
- Persistent user identifiers across sessions
- Cross-site tracking data
- Personal data of any kind
Because no personal data is collected, there is no legal basis for a GDPR consent banner. You can remove it entirely. That banner isn't just annoying — on most sites it reduces analytics accuracy by 20–40% due to users opting out or blocking the analytics script alongside consent prompts.
Step 1: Install the Tracking Script
Add one script tag to your site's <head>:
<script
defer
data-site-id="YOUR_SITE_ID"
src="https://cdn.engagetrack.net/sdk.js">
</script>Your Site ID is available in the EngageTrack dashboard under Settings → Tracking Script.
The script is under 3KB minified and loads with defer, meaning it never blocks page rendering. It dispatches events using the browser's sendBeacon API, which fires on navigation without holding up the next page load.
Framework-specific setup:
For Next.js App Router, add this to your root layout.tsx:
import Script from "next/script";
// Inside your <head> or at the end of <body>
<Script
defer
data-site-id="YOUR_SITE_ID"
src="https://cdn.engagetrack.net/sdk.js"
strategy="afterInteractive"
/>For SPAs using hash-based routing (like some Vue or React apps), add data-hash="true" to track hash navigation as pageviews:
<script
defer
data-site-id="YOUR_SITE_ID"
data-hash="true"
src="https://cdn.engagetrack.net/sdk.js">
</script>Step 2: Verify Data Is Flowing
Open your EngageTrack dashboard and visit your site in another tab. Within a few seconds you should see your visit appear in the Realtime panel — a live counter plus your location, device, and the page you're on.
If nothing appears after 30 seconds, check:
- Is the script tag in the
<head>before the closing tag? - Is
YOUR_SITE_IDthe actual ID from your dashboard (not the literal placeholder)? - Is an ad blocker or browser extension blocking the script? Test in an incognito window.
Step 3: Connect Your Payment Provider
This is where EngageTrack separates itself from every other privacy analytics tool. Without this step, you have traffic data. With it, you have revenue data.
Go to Settings → Integrations and connect whichever payment providers you use.
Stripe
- Click Connect Stripe and authorise via OAuth — EngageTrack gets read-only webhook access
- Select which events to capture:
payment_intent.succeeded,checkout.session.completed,charge.refunded - EngageTrack registers the webhook endpoint automatically
LemonSqueezy, Paddle, Polar
- Generate an API key in your provider's dashboard
- Paste it into the EngageTrack integration settings
- EngageTrack will register webhook endpoints and start receiving payment events
Within minutes of your next successful payment, you'll see a revenue column appear in your Traffic Sources dashboard.
Step 4: (Optional) Improve Attribution Accuracy
By default, EngageTrack uses session-based attribution — payments are matched to the visitor session that preceded them. This works well for products with short purchase cycles.
For better accuracy, especially if your customers take days or weeks to convert, pass the EngageTrack visitor ID into your payment metadata before checkout:
// Get the visitor ID from the EngageTrack SDK
const visitorId = engagetrack.getVisitorId();
// Pass it to your backend when creating the payment
await fetch("/api/create-checkout", {
method: "POST",
body: JSON.stringify({ visitorId }),
});Then on your backend, include it in the Stripe PaymentIntent metadata:
const paymentIntent = await stripe.paymentIntents.create({
amount: priceInCents,
currency: "eur",
metadata: {
engagetrack_visitor_id: visitorId, // EngageTrack reads this from the webhook
},
});When EngageTrack receives the Stripe webhook, it reads engagetrack_visitor_id from the metadata and directly links the payment to the originating session — regardless of how much time has passed.
Step 5: Track Custom Events
The script auto-tracks pageviews, outbound link clicks, file downloads, form submissions, and scroll depth out of the box. For anything else, use the JavaScript API:
// Track any event with optional properties
engagetrack.track("signup_completed", { plan: "startup", trial: true });
// Identify a visitor once they log in (links session to your user ID)
engagetrack.identify("user_8472", {
email: "[email protected]",
plan: "startup",
});
// Track a purchase manually (if not using the webhook integration)
engagetrack.trackPurchase("order_9823", 49.00, "EUR");Identified visitors show up in your Visitor Intelligence panel with their full session history — every page they visited, every event they triggered, and the revenue they generated.
What Your Dashboard Looks Like After Setup
Once tracking is live and a payment provider is connected, your main dashboard shows:
| Channel | Sessions | Conversions | Revenue | Rev / Session |
|---|---|---|---|---|
| Organic Search | 4,210 | 38 | €2,140 | €0.51 |
| Direct | 1,890 | 22 | €1,560 | €0.83 |
| Twitter/X | 820 | 6 | €420 | €0.51 |
| Hacker News | 340 | 11 | €770 | €2.26 |
That last column — Revenue per Session — is the one that changes how you think about marketing. A channel that sends high traffic with low revenue per session is less valuable than one sending fewer, more qualified visitors.
Common Questions
Do I need to tell my users I'm using EngageTrack?
You should mention it in your privacy policy (most do, as a matter of transparency). You do not need a cookie banner or consent mechanism because no personal data is collected and no cookies are set.
Will EngageTrack affect my Lighthouse / Core Web Vitals scores?
No. The script is under 3KB, loads with defer, and uses sendBeacon for events. It is invisible to Lighthouse's performance scoring.
What happens if a visitor uses an ad blocker?
Some ad blockers will block the EngageTrack script. This is a known trade-off of client-side analytics. For maximum accuracy, consider proxying the script through your own domain — see the custom domain setup docs.
Can I use EngageTrack alongside GA4?
Yes. Many teams run EngageTrack as their primary dashboard (replacing GA4 for day-to-day decisions) while keeping GA4 for specific use cases like Search Console integration. There is no conflict.
Ready to see which channels drive revenue for your product? Start your free 14-day trial — no credit card required.