Hi,
We are tracking 3 site (development, QA and production). We installed correctly Matomo Tag Manager with the respective site_id, container_id and so on and created the same tags, variables and triggers on the 3 tag containers.
In the development environment we noticed that on the Analytics the pageviews were duplicated (i.e. if you were visiting the homepage, in the dashboard, it appeared as if you had visited twice the same page). We made a fix and it worked. Now the fix is in the QA environment (that is, the code is there) but we are experiencing the same issue of duplicated pages. I have checked and the tag, variables and triggers are the same for the Development site and the QA site. Any explanation about this oddity?
Btw, if we open the debug/preview mode for the Development website, I can see the Matomo event banner at the bottom of the page, whereas if I open the debug/preview mode for the QA website the banner does NOT appear
Is there any error in the browser console?
Also, what is the whole code you inserted in your page to integrate Matomo?
Do you use sometime _paq variable during bootstrap or during tracking?
How many Matomo configuration variable do you use in your container?
Can you share the configuration of pageview trigger(s) and tag(s)?
I do not use any _paq variable in any part of my application, however I am using the ‘@socialgouv/matomo-next’ package in order to be able to track the different URLs of my application (since in nextjs they are considered a single page app)
I use only 1 Matomo configuration variable (that is the same for all the containers)
also the pageview trigger and tags are the same (for the DEV container more tags and triggers are being tested today, so you will see some differences, but the tags and triggers for the pageview of matomo Analytics are the same)
could you also tell me why the debug mode is not working for the QA container? I am using the same browser and I can see the matomo cookie installed, but no banner shown for the QA container
As this is managed by some kind of CMS, are you sure the code is present only once on the page?
Also it seems you use some kind of single page application (I see a history change trigger): Can you confirm that the page view doubloon appears on first page view and on history changes?
Are you sure the versions tested in each environment are the same? Be careful, the screenshots you provided show the state of the draft, not the state of the published live version. Also, which version is in debug mode? Also, are you sure you try to preview the good container? (when you preview DEV, you have to add ?mtmPreviewMode=931LmVSK to URLs whereas when you preview QA, you have to add ?mtmPreviewMode=NvEYI357 to URLs)
yes I replied to the errors in the browser console: It is the very first line of my previous answer
yes, it is a SPA (we use Nextjs), but I am sorry I am not able to distinguish if the doubloon appears on first page view or on history change… can you explain me how could I see this difference?
regarding the draft version: I am not able to see that one is a draft version. I am pretty sure I have published all the changes I made
And regarding the preview mode I am using the right URL “extension” but the banner does not appear
→ Try (but don’t valid) to create a new version. If there is some changes, then the draft is different than the last version…
Also, to be sure which version is in preview, disable the preview mode, then re-enable it. If you enable the preview in the left menu, then the draft will be in preview. I you enable via the bug icon in the versions page, then the preview will be enabled for this version.
hi @Kal, I am not sure about how I could duplicate the container tag . Could you please suggest me how I could check this option? In the code I am 100% confident there is only ONE script of Matomo Tag Manager and, as you can see from the screenshots, there are only 2 triggers.
And in any case, I still cannot see the debug banner for the QA container
Just in case that someone else is still searching for a solution. It can help to limit when exactly the trigger should fire. In the “Only trigger when (optional)” Section you can select “History Source” equals to “pushState”