Multiple pageviews

Hi everyone,
Hope you’re doing well!

I have an issue with my tracking, approximately 8 pageviews are collected for 1 unique page and I don’t know how can I fix it … Here is my configuration:




image

thank you very much!

Hi,

your trigger fires whenever any event occurs and your consent variable allows it. The best way would be to find an event that is added to the dataLayer by your consent tool and that is either specific for “analytics” consent or where your consent variable is populated.

The second solution would lead to the same result but still feels “wrong” because the trigger is not fixed: set the tag to fire once per page instead of once per event.

best,
Markus

Hello, thank you very much!

It helped me a lot! I still have two pageviews fired now :stuck_out_tongue:


And I don’t know why …
Thank you very much!

looks good to me… the second pageview must have a different source. Maybe another tag, maybe something implemented directly on the page?

What happens when you pause that tag - do you still see a pageview or none?

Hello, no pageviews are fired when I paused this tag …
Here are the payloads in the developper toool :



Thank you so much for your help!

Just checked the site and I can only see one pageview and several pings that occur because you checked the option to “count session time precisely”. So nothing special up to this point. But as soon as I accept cookies, I can see the second pageview, too.

This makes me wonder if you maybe add a second pageview via some kind of implementation in your consent manager and / or another tag in GTM that only fires when there is consent?

You shoud be able to reproduce that with a fresh Incognito browser tab and / or after resetting your consent choice.

Thank you for your time!
I have 2 differents configurations : OptIn and OptAll :


The OptIn is triggered when the consent is accepted, and the OptAll is trigger on all pages.
Do you think this have an impact on the double pageviews collection?
Even in incognito browser tab I still have these 2 pageviews …

If you fire on all pages and with consent once again, it is no surprise that you end up with one pageview without consent and two in case of consent. Your GTM setup is the reason.

If you want to set up a cookieless tagging in case of missing consent and with cookies for everyone opting in, you should rethink the trigger concept and look in the help files about how to use Piwik PRO without cookies and change that setting according to consent. How this exactly works depends on how you can access consent information on your website.

best,
Markus