1) Matomo Tag Manager container with enabled bundled JavaScript tracker
2) A html page has the following Matomo components:
<head>
…….
<script type="text/javascript">
var _mtm = _mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://matomo.asi.asia/js/container_d2amnenK.js'; s.parentNode.insertBefore(g,s);
</script>
…….
</head>
<body>
…….
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
</script>
…….
<body>
3) Matomo fire:
https://matomo.asi.asia/piwik.php?action_name=ONLINE%20RESERVATION%20SYSTEM&idsite=&rec=1&r=383665&h=10…
Unfortunately Matomo fire the trackPageView or other events without a number for idsite.
A little later, Matomo triggers the correct event with the idsite, which comes from the page view event of the Matomo tag itself.
4) Temporary fix: We fire delayed the _paq.push([‘trackPageView’]) then all is good.
Question: What is the simplest way in Webbrowsers JavaScript to verify and confirm that Matomo Tagmanager and all other Matomo components fully initialized & operational?