There's a new version of the HubSpot API
We're also working on a new documentation website, you're invited to check it out and give us your feedback.
HTTP Methods:
POST
Content Type:
application/json
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers
Products:
Marketing
Track a page view. This function is called when the tracking code is loaded on a page, but you can manually call this function to track subsequent views in a single page application.
This function does not support any arguments.
The title tracked will be the current value of document.title
The URL tracked is based on one of either:
setPath
has never been called, the tracked URL will be the Referer HTTP header in the request being made by the visitor's browser to HubSpot's tracking servers (modifying the browser history state would update the value used for that header).setPath
call into _hsq
before the tracking code is loaded. See the Tracking Code overview page for an example of this.setPath
function to update the path of your new pages, as the canonical URL set from the link tag will override any detected URL if you're only updating the browser history state.