Are you using a cache plugin? Maybe it will help to clear your cache.
Please also keep sure the tracking code is added by wp_footer() in your footer.php (i.e. not inserted manually before).
I thought it was the cache, but I’ve tested on a site without any caching system and I see the same problem. Enabling/disabling the code works, but not the switch to enable/disable “/js”.
Hmmm… looks fine here:
Can you post a screenshot of your tracking settings, please?
Are you using WP-Piwik in network mode or as a simple blog’s plugin?
Since this forum doesn’t support pictures, I’ll just post the options which have been ticked:
- Add tracking code
- Use js/index.php
- Avoid mod_security
- Tracking filter: Administrator
I’m using the plugin in “simple blog” mode, on a network.
You can post pictures by posting a link, e.g. to an upload service like MediaFire. Anyway… I tried your settings here but the plugin is still working fine.
This evening I’ll set up a test environment to try your base configuration (“simple blog” on a network). Maybe so I can get behind this issue.
I’m currently at loss with this. Everything is fine in my test environment, too.
Can you tell me your blog’s URL so I can have a look at the inserted tracking code?
I have to apologize… I’ve just checked again and the switch is working. I did restart Apache though, so maybe something was stuck, but it’s definitely working now.
Thank you for your time.
Well, I’ve just tested again and it doesn’t always work. Something is preventing the plugin from writing to the database.
If I disable that setting, it works, but if I try to re-enable it, it doesn’t. If I go to “settings” and come back to “tracking”, then it’s switched back on.
And there are no errors in the logs, just warnings:
[Mon Oct 22 23:27:06.460999 2012] [:error] [pid 61751] [client 220.127.116.11:54469] PHP Warning: Creating default object from empty value in /wp-admin/includes/update.php on line 90, referer: https://www.domain.com/wp-admin/options-general.php?page=wp-piwik/wp-piwik.php&tab=tracking [Mon Oct 22 23:27:06.476263 2012] [:error] [pid 61751] [client 18.104.22.168:54469] PHP Warning: strpos(): Empty delimiter in /wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/Parser.php on line 88, referer: https://www.domain.com/wp-admin/options-general.php?page=wp-piwik/wp-piwik.php&tab=tracking
And we’re running mod_sec by the way, but all the scores are below the threshold.
Thanks for posting the warnings, I’ll have a look at my code again. Maybe this option’s handling differs in a detail from the others.
I still was not able to reconstruct this issue. Maybe it regards to this one: http://wordpress.org/support/topic/after-upgrade-piwik-automatically-places-cookies-again?replies=6 Please try again in 0.9.7.
Hi and thanks for the plugin!
I’ve been using js/index.php option and it works well but only partially.
According to http://demo.piwik.org/js/README
* If you are concerned about the impact of browser-based privacy filters which
attempt to block tracking, you can change your tracking code to use “js/”
instead of “piwik.js” and “piwik.php”, respectively.
However, in your code it only replaces piwik.js and not piwik.php…
thank you for this information. I’ll have a look at this and add an option to replace piwik.php, too.
- The topic ‘js/index code not generated in footer’ is closed to new replies.