curl --request POST \
--url https://js.hs-scripts.com/trackPageView \
--header 'Content-Type: application/javascript' \
--data @- <<EOF
"_hsq.push(['trackPageView']);"
EOFManually track a page view. This is automatically called when the tracking code loads, but can be used for single-page applications.
curl --request POST \
--url https://js.hs-scripts.com/trackPageView \
--header 'Content-Type: application/javascript' \
--data @- <<EOF
"_hsq.push(['trackPageView']);"
EOFtrackPageView is automatically called when the tracking code loads, so you should not push any trackPageView calls to _hsq before the page loads.var _hsq = (window._hsq = window._hsq || []);
_hsq.push(["trackPageView"]);
var _hsq = (window._hsq = window._hsq || []);
// First set the path
_hsq.push(["setPath", "/about-us"]);
// Then track the page view
_hsq.push(["trackPageView"]);
setPath to track the correct page path in SPAsPage view tracking data
Optional path to track (if different from current page)
Page view tracked successfully
Was this page helpful?