trackPageView
is automatically called when the tracking code loads, so you should not push any trackPageView
calls to _hsq
before the page loads.Usage
Basic Page View
For Single-Page Applications
Notes
- Use this method when you need to track page views without reloading the page
- Commonly used in single-page applications (SPAs)
- Use with
setPath
to track the correct page path in SPAs
Body
application/javascript
Page view tracking data
Optional path to track (if different from current page)
Response
200
Page view tracked successfully