Gleap Documentation home page
Search...
⌘K
Dashboard
Dashboard
Search...
Navigation
Javascript
Track pages
Documentation
API Reference
Website
Helpcenter
Roadmap
Blog
Get Started
Introduction
SDKs
Javascript
Introduction
User identity
Callbacks
AI tools
Replays
Forms
Feedback button
Push notifications
In-app notifications
Audio recording
Console logs
Custom actions
Ticket attributes
Custom data
Track pages
Track events
Tags
Custom URL handler
Network logs
Translations
Widget control
Prefill the widget form
Privacy controls
Cookies
Environment
Content Security Policy (CSP)
Rendering issues
Widget apps
UI components
iOS
Android
ReactNative
Flutter
FlutterFlow
Ionic / Capacitor
Cordova
Server-side event tracking
NodeJS
REST
Guides
Enforce identity verification
On this page
Track a page
Javascript
Track pages
The JS SDK tracks pages based on URL changes by default. If you want to customize the tracked pages you can do so by using the trackEvent() method below to track custom pages.
Track a page
Copy
Gleap
.
trackEvent
(
"pageView"
, {
page:
"Example page"
,
});
You will be able to use the tracked pages as triggers in outbound messages as well as breadcrumbs for debugging.
Custom data
Track events
Assistant
Responses are generated using AI and may contain mistakes.