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.
FeatureWhat It TracksEvents Generated
Form TrackingAll form submissions and abandonments$form_submit, $form_abandon
Click TrackingLink and button clicks, plus data-track-event elementsClick events
Download TrackingFile downloads (.pdf, .docx, .zip, .xlsx, etc.)Download events
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

Use Automatic TrackingUse Custom Events
Form submissionsDemo requests with custom fields
General click trackingPricing plan selection
File downloadsVideo engagement (play, complete)
Link navigationIn-app feature usage
Purchases and conversions
A/B test interactions

The track Method

eventName
string
required
The name of the event. Use [Object] [Action] format (e.g., “Trial Started”, “Plan Selected”).
properties
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

Use Declarative (data-track-event)Use JavaScript (Snitcher.track())
Simple click trackingComplex event logic
Static HTML / CMS contentDynamic values from state
No JavaScript accessNeed to track non-click events
Marketing pagesApplication interactions
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

EventFired When
initializedTracker finishes loading
pageviewA pageview is tracked
identifyA user is identified
trackA custom event is tracked
form_submitA form submission is captured
clickA click is tracked (when enabled)

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