Preview mode not displaying

Hi all,

I’m facing an issue on Tag Manger where the preview mode is not displaying. I checked other post about similar issue and I tried all advices to make it work properly as to clean browser cache, to test different browsers (Chrome, Firefox and MS Edge), uninstall all extensions from the browser, to test in a incognito window and to test in different desktop devices. Nothing is working!

I know the Tag I published is working because I can see visitors been tracking on real-time report but I can not test or validate any new tag on Debug/Preview mode before publish anything.

What else can I do to make it work?

As additional information, I’m running Matomo 4.1.1 on a IIS 10 with PHP 7.3.8. It is tracking a website developed in .NET.

Thank you
Oswaldo

1 Like

Did you figure it out Oswaldo?

For other users and for more efficiency: link to the same subject : Matomo Tag Manager - Only preview works - Support & Bugs - Matomo forums
@ograssini , if you found a solution, don’t hesitate to share it there! :wink:

I have the same problem, I can´t see the debug window. Deleted cookies, cache etc. & allowed the website to open a popup window. Still not working.

I am using Matomo for Wordpress.

This is the code, I can see in the source code:

<!-- Matomo --><script type="text/javascript">
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);_paq.push(['setTrackerUrl', "\/\/www.mydomain.de\/wp-content\/plugins\/matomo\/app\/matomo.php"]);_paq.push(['setSiteId', '1']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src="\/\/www.mydomain.de\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
</script>
<!-- End Matomo Code -->```

And this is where the code is coming from: 

console.log(‘matomo active’);
var _mtm = window._mtm = window._mtm || [];
_mtm.push({‘mtm.startTime’: (new Date().getTime()), ‘event’: ‘mtm.Start’});
var d=document, g=d.createElement(‘script’), s=d.getElementsByTagName(‘script’)[0];
g.async=true; g.src=‘https://www.mydomain.de/wp-content/plugins/matomo/app/../../../uploads/matomo/container_TLbyXaLB.js’; s.parentNode.insertBefore(g,s);```

Does anybody have an idea what the problem is?

I don’t understand what you mean by:

Also I don’t understand why you have Matomo classic JavaScript tracking (_paq bootstrap code) and Matomo Tag Manager tracking (_mtm` bootstrap code).

Do you confirm that for preview you try to reach https://wp-server/your-path/your-page?mtmPreviewMode=TLbyXaLB

Be careful, in case of frames, the mtmPreviewMode preperty can be not being transmitted to the frame.

Hi Philippe!

The developer told me that the code is loaded from there. I honestly don´t know why he did it like this.

Should I delete the classic JavaScript Tracking and only keep the Matomo Tag Manager tracking?

Yes this is the preview I try to reach

Is there any error in the JavaScript console?
Is there any error in the network console?
Can you confirm there is no frame in your page?

Hi Philippe,
thank you for your help. My developer managed to solve the problem. Unfortunately I don´t know how he did it.

hello @Christina @Philippe can you help me i can’t see debug window in chrome. Deleted cookies, cache etc. & allowed the website to open a popup window. Still not working.i am using CodeIgniter php. .

Hi @kishan_jethloja

  • Is there any error in the JavaScript console?
  • Is there any error in the network console?
  • Can you confirm there is no frame in your page?
  • What is the tracking bootstrap? (don’t forget to obfuscate sensitive data, like server names, etc.)
  • Did you activate the debug mode on Matomo?
  • How did you try to activate the debug mode in your browser?
  • Is there no page redirection while trying to debug?
  • Does your application change the url address (in some SPA, the application can update it and then the debug mode won’t launch)?

hello @heurteph-ei i checked there is no error in javascript and network console.i already use MTM i am call page view by appending a mtmPreviewMode after url.

thanks

i am using in my localhost only the thing is.

Hi @kishan_jethloja

  • Can you confirm there is no frame in your page?
  • What is the tracking bootstrap? (don’t forget to obfuscate sensitive data, like server names, etc.)
  • Is there no page redirection while trying to debug?
  • Does your application change the url address (in some SPA, the application can update it and then the debug mode won’t launch)?

@heurteph-ei
yes i have no frame i have just put a simple html page with like this for testing purpose

Hi @kishan_jethloja
Can you share the full MTM integration script?

hello @heurteph-ei

sorry for late reply

my team member was resolved the issue but i also don’t know how it was resolve because they follow diffrent steps but they don’t remember.

Thank you

1 Like