Hubspot tracking code in Angular single page application
Hey @BroLegend , not entirely sure what you mean by automatically update, but a lot of people will hold the path to the page in state via the router, or in the application's state. You can then set and pull from the state each time a new "page" has loaded in your SPA. You can do this onclick, or when the applications state has changed or a new route it hit.
Not sure if that answers your question at all, but hope it points you in the right direction.
Hubspot tracking code in Angular single page application
@cbarley10 I'm thinking of having a router.events.navigationEnd which triggers .push function to set path. Is that possible? Or if there is a better way to do it?
Hubspot tracking code in Angular single page application
sounds about right, as long as there's an event in the DOM that can trigger the push method on the _hsq array, you should be good. To be fair though, I'm not very familiar with Angular.