Welcome to Highlight
Getting Started
Overview
Backend SDK
Overview
Express Backend
Go Backend
Next.js Backend
Node.js Backend
Client SDK
Angular
Overview
Gatsby.js
HTML
Next.js
Other
React.js
Shopify
Squarespace
SvelteKit
Vue.js
Webflow
WordPress
Next.js SDK
Highlight()
Metrics
nope
Overview
withHighlightConfig()
Tips
Content-Security-Policy
Local Development
Monkey Patches
Performance Impact
Proxying Highlight
Session Search Deep Linking
Troubleshooting
Upgrading Highlight
Session Replay
Console Messages
HTML iframe Recording
Identifying Users
Live Mode
Network DevTools
Privacy
Rage Clicks
Recording Network Requests and Responses
Session Sharing
Session Shortcut
Tracking Events
Versioning Sessions
Error Monitoring
Grouping Errors
Sourcemaps
Versioning Errors
Product Features
Alerts
Analytics
Canvas
Comments
Environments
Frontend Observability
Keyboard Shortcuts
Performance Data
Segments
Session Search
Team Management
User Feedback
Web Vitals
WebGL
Integrations
Amplitude Integration
Clearbit Integration
Electron Integration
Front Plugin
Intercom Integration
Linear Integration
Mixpanel Integration
React.js Integration
Segment Integration
Sentry Integration
Slack Integration
Vercel Integration
highlight.run Changelog
5.0.0
Menu
Docs / Session Replay / Tracking Events

Tracking Events

A track event is a named event that you've defined. Adding a track event is useful if you want to be able to be alerted (see Recording Network Requests and Responses) or search for sessions where the user has done an action.

Example Scenario: A Shopping Cart

You'd like to see what users are doing that cause them to open the shopping cart. In your app, you'll add H.track():

import { H } from 'highlight.run'; import { getSubtotal } from '@utils'; const ShoppingCard = ({ items }) => ( <Button onClick={() => { H.track("Shopping Cart Opened", { subtotal: getSubtotal(items), numberOfItems: items.length }); }} > Shopping Cart </Button> )
Copy
API

See the Recording Network Requests and Responses API documentation for more information on how to use it.