Skip navigation

Have beacon URL update on Single Page Apps

score 8
You have not voted. New Idea

Currently, on a single page app, my first beacon will have the correct URL. But if I navigate to another page, and there is a history/state/URL change without loading a new DOM, my URL does NOT update- my "g" parameter in my beacon still reflects the first page loaded.
These days, most single page apps DO update the URL as the user navigates around; it would be good to have that URL reflected in analytics.
I often manually force this by doing something like "s.pageURL=document.location.href" in doPlugins or similar, but it would be great to have it be built in- folks get confused when they see my workaround because they think "isn't that what pageURL is automatically?" (answer: not on a single page app).

Comments

Vote history