-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added more functionalities: custom piwik.js, piwik.php and _paq JS #2
base: master
Are you sure you want to change the base?
Conversation
Thank you for the code contrib. I'll give it a run through and see how it works. I assume the main desire of these options is to avoid detection by ad blockers? |
Yep, correctly :-) Thanks! |
$trackingCode = str_replace("piwik.php", $settings["piwikPhp"], $trackingCode); | ||
} | ||
|
||
file_put_contents($trackingCodeFile, $trackingCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes webserver has write permissions to file. Need to check permissions or handle failure and provide instruction to user. User would need to either SSH in to do the process manually or set write perm for web server process.
Bernhard, I'm been testing this out and it looks like omitting /piwik/, piwik.js, and piwik.php from the URL does the trick of avoiding getting blocked by the EasyPrivacy list using Ublock Origin and Adblock+. I'm not sure, at least at this point, if rewriting the piwik.js file is necessary. I think a cleaner approach would be to have the plugin create symlinks to piwik.js and piwik.php with the new filenames. Do you know of blocklists/programs that analyze the piwik.js file was may block if it isn't rewritten? There are some other issues to address
Thank you, |
Hi Josh, Thanks for your feedback! So you can still just copy & paste the code as it is and you won't face any issues caused by overwriting the _paq JS variable. I'll provide a fix for the remaining 2 issues as soon as possible. |
I see 2.16.2 added some functionality to the Javascript API to allows easier setup of multiple trackers. Does that help your use case any? |
Yep, I've seen this too, but my primary intention was to allow careless copy & paste as well as bypassing known tracking blockers. :) |
Added the possibility to customize the name of piwik.js, piwik.php, the _paq JS variable.
See also: