joernroeder / piwik-react-router

Piwik analytics component for react-router
https://www.npmjs.org/package/piwik-react-router
MIT License
61 stars 22 forks source link

Add a public API to set user id #47

Closed caalberts closed 6 years ago

caalberts commented 6 years ago

Adding a public API to set user ID after instantiating PiwikReactRouter.

The method setUserId() can be used instead of having to use the low level push() API with a literal 'setUserId' method name.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f303713e6565a17c3ab3c66959aecf2d1283a607 on caalberts:master into eb54dea92c2bfe16b1b7716e8a4ff1daf2106dc6 on joernroeder:master.

joernroeder commented 6 years ago

Hey @caalberts, thanks for your pull request! I'd like to merge your contribution into master asap but before i'd like to ask if you can change https://github.com/joernroeder/piwik-react-router/blob/master/index.js#L162 to use the new setter too. I'd like to have only one entry point to interact with piwiks userid. thanks!

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 383cc6ecd8e68020ef1b64d8afa1adb0657229f9 on caalberts:master into eb54dea92c2bfe16b1b7716e8a4ff1daf2106dc6 on joernroeder:master.

joernroeder commented 6 years ago

@caalberts just published a new version to npm 0.11.0