<- Back to blog
How-to8 min readUpdated May 1, 2026

How to Track Custom Events with a Privacy-First Tool

A 2026 guide to tracking custom events in privacy-friendly analytics tools. When to use them, naming conventions, and what to track for SaaS, ecommerce, and content sites.

how to track custom eventscustom event trackinganalytics events guideprivacy-friendly custom events

TL;DR

  • 1.Custom events let you track specific actions beyond pageviews: button clicks, form submits, video plays, downloads, signups, purchases.
  • 2.Best practice: snake_case names (signup_click, file_download), 3–5 relevant properties, stay consistent.
  • 3.Don't over-track. Start with 5–10 conversion-relevant events.
  • 4.Privacy-first tools track custom events without cookies — events are aggregated by day.
  • 5.For SaaS: signup_click, trial_started, subscribed. For ecommerce: add_to_cart, purchase. For content: subscribe_click, share_click.

What custom events are

A pageview tracks "user landed on page X." A custom event tracks "user did action Y on the site." Anything that's a meaningful interaction beyond loading a page is a candidate.

Examples: clicking a CTA, submitting a form, playing a video, downloading a file, completing signup, making a purchase, upgrading a plan, opening a chat widget.

When to use custom events

  • Conversion tracking — signups, purchases, leads, demos.
  • Engagement tracking — video plays, scroll milestones, file downloads.
  • CTA optimization — which buttons get clicked from which pages.
  • Funnel analysis — step-by-step user progression.
  • A/B test measurement — which variant of a button or form converts.

Basic syntax

Custom event syntax in Sleek
// Simplest form — no properties
window.sleek('track', 'signup_click')

// With properties
window.sleek('track', 'signup_click', {
  cta_location: 'header',
  variant: 'A'
})

// Conversion event with revenue
window.sleek('track', 'purchase', {
  value: 49.99,
  currency: 'usd',
  product_id: 'starter_plan'
})

Naming conventions

  • Use snake_case: `signup_click`, `file_download`, `video_play`.
  • Verb-noun structure: `signup_click` (not `click_signup`).
  • Past or present tense, but be consistent.
  • Specific over generic: `pricing_cta_clicked` better than `button_clicked`.
  • Document them. A simple Notion page listing all events prevents drift.
tip:Build an "Event Dictionary" listing every custom event with its properties. Without this, event names drift and reports become unparseable in 6 months.

Common SaaS events

SaaS marketing-site events
// Visitor clicks any signup CTA
window.sleek('track', 'signup_click', { cta_location: 'header' })

// Pricing page viewed (high-intent visitor)
window.sleek('track', 'pricing_viewed')

// User completes signup
window.sleek('track', 'signup_completed', { plan: 'free_trial' })

// Trial activated
window.sleek('track', 'trial_started', { plan: 'starter' })

// Paid subscription (best fired server-side)
window.sleek('track', 'subscribed', {
  plan: 'pro',
  value: 49.00,
  currency: 'usd'
})

// Plan upgrade
window.sleek('track', 'plan_upgraded', {
  from_plan: 'starter',
  to_plan: 'pro',
  value: 40.00
})

Common ecommerce events

Ecommerce events
window.sleek('track', 'product_viewed', { product_id: 'abc123' })

window.sleek('track', 'add_to_cart', {
  product_id: 'abc123',
  value: 49.99,
  currency: 'usd'
})

window.sleek('track', 'checkout_started', {
  cart_value: 99.98,
  item_count: 2
})

window.sleek('track', 'purchase', {
  order_id: '#12345',
  value: 99.98,
  currency: 'usd',
  items: 2
})

Common content/newsletter events

Content site events
window.sleek('track', 'subscribe_click', { location: 'inline' })

window.sleek('track', 'subscribed_to_newsletter', {
  source: 'twitter'
})

window.sleek('track', 'share_click', {
  platform: 'twitter',
  post: window.location.pathname
})

window.sleek('track', 'read_50_percent')

Privacy-first considerations

In privacy-friendly analytics, custom events don't link to a persistent visitor identity across days. Sleek uses a daily-rotating hash — same person on day 1 and day 2 looks like two different visitors.

For deep individual user journeys (signup → activation → upgrade across 30 days), pair Sleek with a product analytics tool with authenticated user IDs (PostHog, Mixpanel) running inside your authenticated app.

Common custom event mistakes

  • Tracking too many events. Start with 5–10. Add more only when needed.
  • Inconsistent naming (signup_click vs SignUpClick). Pick one convention.
  • Passing PII (email, name, full address). Don't.
  • Not testing. Verify the event fires with right properties before launch.
  • Tracking the wrong moment. Fire when the action SUCCEEDS, not when it's attempted.

Frequently asked questions

How many custom events should I track?

Start with 5–10 high-value events. Add more only when you have a specific question they'd answer. Tracking 50+ creates noise and dilutes signal.

Should I track every button click as a custom event?

No. Only track conversion-relevant CTAs (signup, demo, pricing, contact). Tracking every button adds event volume without adding insight.

Can I track custom events in privacy-friendly analytics?

Yes. Sleek, Plausible, and Fathom all support custom events. The mechanics are similar to GA4 but the data is more accurate.

Do custom events count against my event budget?

On Sleek and most usage-priced tools, yes. Each event (pageview or custom) counts toward your monthly budget.

Should I fire custom events client-side or server-side?

For most events, client-side is fine. For high-stakes conversions (paid signups, purchases), also fire server-side from your webhook to capture 100%.

How do I track A/B test variants in custom events?

Pass the variant identifier as a property (`variant: 'A'` or `variant: 'B'`). Your analytics segments conversion rates by variant.

Track your own growth loop

Sleek Analytics gives you visitors, sources, pages, devices, and real-time behavior with one lightweight script. No cookies, no GDPR banners.

Related reading