[WONTFIX] Custom name for piwik.js


(syc) #1

It would be great if (after installation) we could set a custom name for piwik.js in the Settings panel. Piwik.js would be renamed and anything in Piwik that pointed to piwik.js would be re-routed to the filename of choice. The EasyList subscription in Adblock Plus explicitly blocks piwik.js, and being able to rename this filename to a custom string would enable us to track much more effectively.

Thanks for your time!


(vipsoft) #2

This is unnecessary.

Just substitute “js/” for “piwik.js”. This will use the js/index.php script which supports conditional get, last-modified, and (in 0.5.5) deflate/gzip compression.

Hard-coded, it would look like:

<script type="text/javascript" src="http://example.org/stats/js/" />

#3

The following is the third line of the tracker code.

document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));

It contain "pwiki.js’.
Is it in this string that we that replace it by "js/’ ?

If that would make adblock users show up again is stats, i would use the multi search replace function of DW CS4 to change this on all pages of all my sites.


(vipsoft) #4

First, you’ll have to download the latest version of js/index.php.

Then, in your tracking code, change both “piwik.js” and “piwik.php” to “js/”.


#5

Thank you for the info!

Why is this solution with “js/” instead of “piwik.js”/“piwik.php” not the standard approach? I mean: why is that not implemented in Piwik by default? Are there any disadvantages, and if so, which?