Skip to main content
Snitcher tracks events in two ways: automatic tracking (zero code required) and custom events (for business-specific actions). Most users should start with automatic tracking enabled.

Automatic Event Tracking

Enable automatic tracking in your dashboard under Settings → Tracker → Features. No code changes required.
Recommended: Enable all three for comprehensive tracking without writing any code. You can always add custom events later for specific use cases.

What Gets Tracked Automatically

With Form Tracking enabled:
  • Form submissions (with form ID, action URL, and field names)
  • Form abandonment (when users start but don’t complete forms)
With Click Tracking enabled:
  • All link clicks (with href, text, and position)
  • Button clicks
  • Elements with data-track-event attribute (see Declarative Tracking)
With Download Tracking enabled:
  • PDF, Word, Excel, PowerPoint downloads
  • ZIP, RAR, and other archive files
  • Any link with a download attribute

Custom Events

For business-specific actions not covered by automatic tracking, use the Snitcher.track() method.

When to Use Custom Events

The track Method

string
required
The name of the event. Use [Object] [Action] format (e.g., “Trial Started”, “Plan Selected”).
object
Additional context about the event.

Examples

Track a demo request with business context:
Track pricing interactions:
Track video engagement:
Track in-app actions:

Declarative Click Tracking

For simple click tracking, you can use HTML data-* attributes instead of writing JavaScript. This is perfect for marketing sites, CMS-managed content, or anywhere you want to track clicks without code changes.

The data-track-event Attribute

Add data-track-event to any element to make it trackable:
When clicked, Snitcher automatically captures the click with the event name you specified.

Adding Custom Properties

Include additional data-* attributes to pass properties with the event:
This sends an event with properties:
Property names are automatically converted from kebab-case to camelCase. So data-button-location becomes buttonLocation.

Common Examples

Tracking navigation clicks:
Tracking feature interest:
Tracking pricing tier interest:

When to Use Declarative vs JavaScript Tracking

Requires Click Tracking: Enable click tracking in Settings → Tracker → Features for declarative tracking to work.

Event Naming Best Practices

Do

  • Use [Object] [Action] format
  • Be specific: “Pricing Plan Selected”
  • Use consistent capitalization
  • Keep names concise

Don't

  • Don’t use vague names: “Clicked”
  • Don’t include dynamic data in event names
  • Don’t use special characters
  • Don’t exceed 100 characters

Good Event Names

Property Guidelines

  • Use snake_case for property names
  • Keep values short and meaningful
  • Include context: page URL, button location, user action
  • Don’t include PII (emails, names) unless necessary

Viewing Events in Snitcher

Custom events appear in:
  1. Company Timeline: See all events from a specific company
  2. Session Details: View events within a visitor session
  3. Segments: Create segments based on custom events

Flush Events Immediately

By default, events are batched and sent periodically. To send immediately (useful before navigation):

React / Vue / SPA Integration

For single-page applications, track events normally—the tracker handles client-side navigation automatically:

Event Listeners

Snitcher emits events that you can listen to for custom integrations, debugging, or triggering other actions.

The on Method

Subscribe to tracker events:

Available Events

Examples

Wait for tracker to initialize:
React to pageviews:
Log all tracked events:
Sync identification with other tools:

One-Time Listeners

Use once to listen for an event only once:

Remove Listeners

Use off to remove a listener:
Event listeners are useful for integrating Snitcher with other tools, debugging, or building custom analytics dashboards.

Debugging

Open your browser’s Developer Tools to see event tracking in action:
  1. Go to the Network tab
  2. Filter by radar.snitcher.com
  3. Click on requests to see event payloads
Events are batched, so you may see multiple events in a single request.

Debug Mode

Enable debug mode to see detailed logs in the console:
With debug mode enabled, you’ll see logs for:
  • Tracker initialization
  • Every event sent
  • Any errors encountered