You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when putting the tracking code [1] into files and placing it at the bottom or at the top
(within head part bevor tag [2]) of the website the FireFox browser is placing
a message/warning in the console (F12 inspector view).
Message:
"_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded.
Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can
create a tracker..."
The message is not displayed all the time!
Its needed to reload the website in the browser (F5) a few times 5-6 to force this message.
When switching the position of 'tracking.js' and 'piwik.js' so that 'tracking.js' is loaded first,
it looks fine, so that there's no message appearing anymore.
Assumption:
Fail: If the 'piwik.js' is loaded fully first and then the 'tracking.js' the message appears.
OK : Otherwise if 'tracking.js' is finished loaded to be first and the 'piwik.js' no message appears.
I was just asking myself why anyone would load the piwik.js by himself, instead of doing this at the end of the tracking code. But than I saw that this is exactly how it is done in the FAQ.
I'm no CSP guru, but it is possible to load the piwik.js dynamically at the end of the tracking.js?
Not sure what the problem is here? If you load it differently, you just need to make sure to load it in the right order. That's what the message is telling you. Make sure the tracker is initialized before tracker is loaded. If there's any bug, I'm happy to reopen.
When I am using the official method proposed in [1] the message occurs. So it seems to me that the published way [1] is not correct, isn't it ?
Of course I can change the order loading 'tracking.js' first but it would against your documentation [1].
Why you do not change the documentation on you website :o ?
when putting the tracking code [1] into files and placing it at the bottom or at the top
(within head part bevor tag [2]) of the website the FireFox browser is placing
a message/warning in the console (F12 inspector view).
Message:
"_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded.
Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can
create a tracker..."
The message is not displayed all the time!
Its needed to reload the website in the browser (F5) a few times 5-6 to force this message.
When switching the position of 'tracking.js' and 'piwik.js' so that 'tracking.js' is loaded first,
it looks fine, so that there's no message appearing anymore.
Assumption:
Fail: If the 'piwik.js' is loaded fully first and then the 'tracking.js' the message appears.
OK : Otherwise if 'tracking.js' is finished loaded to be first and the 'piwik.js' no message appears.
Using Matomo 3.9.1
[1] https://matomo.org/faq/general/faq_20904/
[2] https://matomo.org/docs/installation/#install-the-javascript-tracking-tag
The text was updated successfully, but these errors were encountered: