Skip to main content

TrackView

Automatically track when an element becomes visible in the viewport using Intersection Observer.

Props

string
default:"element_viewed"
Event name to track
EventProperties
Additional properties to include with the event
ReactNode
required
Content to render and track
number
Percentage of element that needs to be visible (0-1)
number
default:1000
Delay in milliseconds before tracking

Usage

TrackClick

Track click events on wrapped elements.

Props

string
default:"click"
Event name to track
EventProperties
Additional properties to include with the event
ReactNode
required
Content to render and track clicks on
string
Element identifier for the tracked element

Usage

Automatically captures click coordinates and target element information.

TrackForm

Track form submissions and field changes.

Props

string
required
Unique identifier for the form
ReactNode
required
Form content
boolean
default:true
Whether to track form submissions
boolean
default:false
Whether to track individual field changes

Usage

TrackScroll

Track scroll depth milestones.

Props

ReactNode
required
Content to render
number[]
Scroll depth percentages to track

Usage

TrackTime

Track time spent on page at specific intervals.

Props

ReactNode
required
Content to render
string
default:"time_on_page"
Event name to track
number[]
Time intervals in seconds to track

Usage

Automatically tracks final time on page when component unmounts.

AnalyticsErrorBoundary

Error boundary that automatically tracks React errors.

Props

ReactNode
required
Components to monitor for errors
ReactNode
Component to display when an error occurs
(error: Error, errorInfo: React.ErrorInfo) => void
Custom error handler callback

Usage

PerformanceMonitor

Monitor and track component render performance.

Props

ReactNode
required
Components to monitor
boolean
default:true
Whether to measure render performance
string
default:"unknown"
Name to identify the component in analytics

Usage

HeatmapTracker

Track user interactions for heatmap visualization.

Props

ReactNode
required
Content to track
boolean
default:true
Track click positions
boolean
default:false
Track hover events
boolean
default:false
Track scroll events
string
default:"heatmap-element"
Element identifier

Usage

Captures exact pixel coordinates relative to both the element and the page.

SessionMonitor

Monitor session activity and track inactivity periods.

Props

ReactNode
required
Content to render
boolean
default:true
Whether to track user inactivity
number
default:60000
Inactivity threshold in milliseconds (default: 1 minute)

Usage

withTracking

Higher-Order Component for automatic component view tracking.

Signature

Usage

All tracking components are designed to be SSR-safe and will only initialize tracking on the client side.