• After getting odd statistics, I went looking and it seems the js tracker is getting cached on our site.

    On this test page:

    test page

    …you should see this cached result:

    paq.push(['setUserId', 'testuser2']);

    So it seems at least the user variable is getting cached (which prevents accurate tracking).

    We use W3TC and Autoptimize, but W3TC seems to be causing the cache issue.

    Any suggestions for prevent cache of the Matomo’s js tracker, while still being able to use cache plugins?

    Thanks for any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author braekling

    (@braekling)

    Having a look at your site, I can’t see the user ID setting. So at least for not logged-in users it seems to work, doesn’t it?

    I’m not using any caching plugins, so it’s hard to say. But maybe W3TC offers an option to ignore a specific piece of code? At least, it’s possible to disable minifying inline JS… maybe this is a workaround?

    Thread Starter andrew55

    (@andrew55)

    Thank you for the reply. The user IDs work great. I think the issue is that they are getting cached (which destroys tracking ability).

    I’m switching to LiteSpeed Cache soon, so maybe they will have a workaround to prevent cache.

    Plugin Author braekling

    (@braekling)

    Hm, yes, the tracking code has to be generated for each user individually, so if the generated pages get cached, this leads into problems. But on the other hand, caching should not affect dynamic components, so I bet there should be a solution.

    If you find a solutions, please feel free to share – or maybe somebody else is able to provide some additional information?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tracker getting cached’ is closed to new replies.