When I try to view the preview mode, the panel doesn’t appear. I have looked in the console tab and don’t seem to be getting any error messages showing any error messages. I have cleared cache aswell but to no avail. I seemed to get it working for a few hours, then despite not messing with anything after this, I’m running into the same problem again. Any recommendations for solutions?
Hi Matt,
Does the PreviewMode parameter append to the URL of your site when you test?
Are you using Matomo on a different domain than your website?
There are a number of reasons.
Hi @utrautma thanks for your reply. The answer to both your questions are yes
Hi @matt_Horman ,
The first thing would be to consistently check whether there is really a JavaScript error that is preventing the Tag Manager container from loading and running. That is the most common reason.
The second thing is whether the container for which you activated the preview mode is actually integrated into the website.
Or whether your browser is blocking Matomo due to an ad blocker/privacy tool. You can find that out by looking at the network traffic in the developer tools.
Then it may be that the preview mode was activated a long time ago. I don’t know exactly, but Matomo seems to remember the activation in the database, but if it was more than a week or two ago, it no longer works in the browser. I deactivate and then activate again.
The Matomo Tag Manager also sets a cookie mtmPreviewMode
for the domain of the Matomo installation, which contains information about the active preview mode.
If your website has a different subdomain or other first-level domain, you can edit the cookie for the domain in your browser’s developer tools so that it also works on your domain.
But normally it should work using the preview parameter attached to the URL.
The problem with the mtmPreviewMode cookie may be that it contains a path (e.g. /matomo). In this case, the cookie is ignored because your website probably does not run on the path. Here, too, deleting the path from the cookie in the developer tools would help.