Plugin Author
Thomas
(@tsteur)
Hi @yvessaintlary
that happens when the page is sometimes viewed as
/page-name
and sometimes as
/page-name/.
As far as I know there is not really any easy workaround this if you wanted to prevent except for maybe using some custom tracking code or redirecting pages like /page-name to /page-name/ so they always have the same URL.
Is it possible that the same URL can be accessed with and without a trailing slash?
Hi Thomas,
My permalink structure is as following : /%postname%/
So normally, urls without trailing slash should’nt exist or appear in the stats.
Plugin Author
Thomas
(@tsteur)
@yvessaintlary they should be redirected by WordPress indeed. Maybe it’s not always working for some pages. For the pages reported in Matomo, can you maybe check if they are accessible without the trailing slash? If that’s not the case, is there a chance you could create a user for us with the Matomo Super User role capability in your WordPress? If so, could you create a user for wordpress@matomo.org ? We would only have access to the Matomo part in your WordPress and nothing else.
@tsteur I checked my pages and all urls without trailing slash are redirected to the trailing slash version.
I’ll send you a message with the access infos.
Thanks
Plugin Author
Thomas
(@tsteur)
Thanks for this @yvessaintlary
I just checked and it seems the redirect is only happening when you are logged in but not when you are not logged in. Maybe there is some configuration or plugin that prevents the redirect for not logged in users? I’ve viewed your page in incognito mode and then there was no redirect. This explains the issue.
@tsteur
Thanks a lot, I haven’t seen that.
It is caused by the cache plugin, Wp rocket which offers a turn around here: https://fr.docs.wp-rocket.me/article/232-redirection-pour-forcer-le-slash-de-fin-des-urls
Regards
Plugin Author
Thomas
(@tsteur)
Great @yvessaintlary . Glad you found the problem and could work around it.