Skip to content

Conversation

dammyammy
Copy link

I Propose Automatically Setting Page using VueRouter Lifecycle Hook as an alternative. This is cleaner, in my opinion, and also reduces having to rewrite it on each page component.

Instead of having to call analytics.page on every single page, it becomes tiring a the number of pages grows, a more streamlined approach would be to call page automatically as the original javascript embed does use the afterEach Hook in VueRouter, and then doing the necessary track, identify etc calls within each Page component.

It Mimmicks the default javascript code behaviour as intended by the segment tracking code in SPAs.

Automatically Set Page using VueRouter Lifecycle Hook. Instead of having to call analytics.page on every single page, it becomes tiring a the number of pages grows,  a more streamlined approach would be to call page automatically as the original javascript embed does use the afterEach Hook in VueRouter, and then doing the necessary track, identify etc calls within each Page component.
This Call is redundant as the page is being set by VueRouter.
This Call is redundant as the page is being set by VueRouter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant