Closed ThomasTr closed 7 months ago
Are you using Redis (or another database caching mechanism) by any chance? Because I'm failing to reproduce this issue.
No, don't using redis or any caching plugin.
The switch for "View stats in WordPress" works for example (setting is persisted). But the switches under "Enhanced Measures" (hope this is the english version, as my install is localized on german language) are not persisted. They are all off after page reload when i try to activate one ore more of them.
Are you getting errors in your browser's console when toggling an enhanced measurement option? Or do you see anything relevant in your PHP error log?
Everything seems fine, no errors at all, even the js request in background when switching is fine, example response:
{"success":true,"data":"404 Fehlerseiten enabled."}
But when i reload this page all switches in this section are off. Only the section "Erweiterte Messungen" (German translation, should be enhanced measurements) is not working. other sections like "Benutzerrollen tracken" are working fine and are persisted.
One thing to verify, since 404 tracking is (or seems to be) enabled.
Could you open a page that doesn't exist (e.g. yourdomain.com/blablabla
) and see if this code snippet is present in the page source?
document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });
No, I cannot find such a code on the error page. It seems, the api request says its enabled but it isn't. Therefore after an page reload in admin it shows disabled.
As tracking stopped again, i removed the plugin and simple added the javascript via my themes function.php
The switches under enhanced mesurements in settings are not persisted. The infobox says enabled, after page reload the witch is disabled again.