Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add google analytics anonymizeIp in siteConfig #805

Closed
wants to merge 2 commits into from

Conversation

abruere
Copy link
Contributor

@abruere abruere commented Sep 5, 2018

Summary

A tip about IP anonymization and GDPR was introduced in the docs (#515).

Privacy should be easy: this PR allows to set Google Analytics anonymizeIp option without having to write custom theme/code as previously suggested.

I would have gladly made this default since it has little impact on analytics accuracy but this would still be a breaking change and is left to next branch (ready to make another PR).

ga option can now be a string or an object with id and anonymize optional boolean attribute defaulting to false as explained above.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number) > No issue

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated > No test for Google Analytics (no debug version)

Other information:

I checked that aip=1 is included in event requests (only) when using the option, as stated by Google dedicated page.

vuepress anonymizeip aip=

@ulivz
Copy link
Member

ulivz commented Sep 6, 2018

Thanks for your great work, but could you create this PR to next branch directly?

@ekoeryanto
Copy link
Contributor

I just guess this should be a plugin in the future 1.0

@abruere
Copy link
Contributor Author

abruere commented Sep 6, 2018

Thanks for feedback and for vuepress!

I’ll try to make another PR to next branch google-analytics plugin you pointed to soon.

I wanted to share this with community as soon as we started using it in production.

V1.0 is not ready yet (#798) and many users will probably stay on ^v0.x.y.

It is a low-effort/high-impact improvement since it affects all end-users privacy on vuepress websites with Analytics enabled. Privacy by default (starting from v1.0) would be sensible.

I suppose there will be another minor v.0.x.y release at least and according to semver this change could make it to 0.14.3 for instance. I’ve just added the badge for convenience but this is up to you of course.

Note: Failing tests are due to babel version and pass when using #800.

@ekoeryanto
Copy link
Contributor

I agree that the v0.x should be accept new feature (PR) as the v1.0 is not yet ready (not even alpha version), as @ulivz said here

@ulivz
Copy link
Member

ulivz commented Sep 8, 2018

We don't plan to maintain two branches at the same time. and next is almost ready, so please create this PR for next branch, Thanks!

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.

3 participants