Open brusch opened 8 years ago
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!
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, Josh
Hi Josh,
Thanks for your feedback! Regarding your question about rewriting piwik.js: The primary intention of this feature is to allow multiple Piwik trackers on the same page, without using a different tracking approach as described here: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers
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. But maybe it is also a helpful feature in the future to get around AdBlock+, ..., who knows ;-)
I'll provide a fix for the remaining 2 issues as soon as possible.
Just pushed the fixes and some more optimizations.
This is how it looks when /piwik.js is not writable:
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: