Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Conversation

@abruere
Copy link
Contributor

@abruere abruere commented Apr 17, 2019

We needed precise control over tracking and as documented in this PR shouldRouterUpdate and pageviewOnLoad: false were not enough, since the former applies to navigation only, and the latter is global and not dynamic.

Having full control of tracking can be useful avoid app-specific duplicate events with pageviewTemplate, due to SSR or any other reason.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

New feature.

What is the current behavior? (You can also link to an open issue here)

An object is required and tracking can’t be prevented.

What is the new behavior (if this is a feature change)?

pageviewTemplate can return a falsy value to prevent tracking as shouldRouterUpdate already does.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

  • The commit message follows semantic-release guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

Thanks for vue-analytics!

Useful to ignore some lazyloaded pages or avoid
app-specific duplicate events with pageviewTemplate
@abruere abruere changed the title feat: skip tracking dynamically feat: skip tracking dynamically starting from first page Apr 17, 2019
Copy link
Owner

@MatteoGabriele MatteoGabriele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR and sorry for the late response!

@MatteoGabriele MatteoGabriele merged commit 9b71254 into MatteoGabriele:master May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants