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

Option to configure name of Piwik resources #34

Closed LINKIWI closed 7 years ago

LINKIWI commented 7 years ago

I'm proposing the addition of fields to the existing options object of PiwikReactRouter to allow specification of the name of the Piwik JS and PHP resources.

Currently, they are hardcoded as piwik.js and piwik.php.

However, in my personal instance of Piwik, these files are main.js and main.php, respectively. It would be nice if this module allowed the user to configure the names of these files, rather than defaulting to piwik.

Is this a valid, general-purpose use case? I'm happy to submit a PR to add this functionality if you believe it is general enough. I also understand that this is a pretty narrow, installation-specific requirement so please feel free to close this issue if it applies too narrowly.

joernroeder commented 7 years ago

Hey, thanks for your idea! I think abstraction is always a the way to go and i would love to see new options (with the current implementation as default) as pull request. But please add tests and docs as well. thanks!

LINKIWI commented 7 years ago

Sounds good! I wasn't sure if the complexity of adding more configuration options was worth the functionality few people would use.

I'll submit a tested and documented PR when ready. Thanks

joernroeder commented 7 years ago

I'll thank you 😊