This is a CloudFlare app to automatically inject Piwik tracking JavaScript code into your CloudFlare powered website.
It (currently) does not support all the Piwik JavaScript tracking code features, so feel free to submit a PR if you can add any of the features. We'll be happy to merge it.
Browser support should be universal. Automated tests are run on all modern, evergreen browsers thanks to Sauce Labs.
We're using a GulpJS powered build system. JavaScript code is automatically built using Uglify . Just run the follow command to get started:
gulp
That will kick off both the Karma test runner and JSHint linting. Both will run constantly in the background, and run the tests in the following browsers:
- Chrome
- Chrome Canary
- Firefox
- Opera
- PhantomJS
Any pull requests should be fully tested.
Unit testing is done with Karma.
To run the unit tests, simply run the following command:
gulp test
Run the build command. It runs all the tests first, and then builds the files if everything passes.
gulp build
- Complete the tracking code options to match the Piwik dashboard.