Console Error Browser Consent Form

when checking my browser console with implemented consent form i get the following errors:

How to fix this?
Thx!

Are you maybe using Matomo?

no, as you can see in the error logs are https://xxxx.piwik.pro urls, what can be the issue ?

Dear Kuba,

I created a tag and a trigger with the consent Manager, for the Cookie policy this is code I use:

I created a tag for each consent with the same code but by changing this line:
‘analytics_consent’: ‘on’ with 'conversion_tracking_consent: ‘on’ and so on for each consent

now when I put this code in a code editor said, that the apostrophes here: ‘on’ are wrong…

can you please send me the right code, to avoid the issue?

thanks

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
'event': 'stg.consentDecision',
'analytics_consent': ‘on’
  });
</script>

I’d start with fixing the apostrophes.

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
'event': 'stg.consentDecision',
'analytics_consent': 'on'
  });
</script>

Check also the debug mode which helps a bit during setup.

thanks for answering, do you think the german documentation, is more helpfull than the english version? somehow the steps are no that clear…

thanks

What do you mean by German documentation?

I thought the tool was german and therefore would exist a german documentation.

Today I check it again and I still get this error can you please check it and let me know how to fix it?


thanks!

Can you share the website url? At this point, using the debug mode would help a lot. This would allow you to check if there are any tracking tags duplicates.

Hi @sall,

it looks like the code is implemented twice. Once via Google Tag Manager and the other one directly by using Piwik PRO Tag Manager. Please disable one of those and everything should be back to normal.

Hi Kuba,

thanks for the message this is what i did:
1.- Disable everything in Google tag manager, remove every google analytics GA3 and GA4 from my website.
2.- Then I set up the piwik Tag in google tag manager with my Piwik set id, etc
3.- because I already create the cookie consent, in the Piwik consent manager, I went to google tag manager, create the variable for each piwik Tag, and I create each trigger for each variable with trigger information: analytics_consent contains on
4.- then I set to the first Piwik Tag ( where my Piwik set id ise set up) the trigger analytics_consent Page view
5.- Now I put again the instalation async code from piwik in the body of my website, and the consent box appear.

My question is, if I had set up each consent tag direct in Piwik tag manager and I have the async code in the body of my website, do i really need to set up everything again in google tag manager?

Also I want to know for the piwik consent tag manager i set up a click trigger with the condition: consent is set, I just want to be sure that the cookies are tracking specific when they are approve… Is that the correct trigger?

let me know

Hi,

if you’re using a 3rd party consent popup, I’d recommend using our JavaScript API to control the consents:

  1. Disable the standard consent popup (Administration → Sites & Apps → Your site → Privacy)

  2. Set proper consent type for each tag in Piwik PRO tag manager

  3. Notify Piwik PRO tag manager about the consent via this api: JavaScript API — Piwik PRO Analytics Suite 16.10 documentation

Hello Kuba,

thanks for the reply. As i use the Consent Manager Piwik PopUp Form, and not a 3rd Party PopUP Form, can you please let me know, what are here the effective steps to get it working correctly?

Thx!

The setup would be much easier if all the tags that require consent were in Piwik PRO Tag Manager. Would that be possible?

All the Tags are already in the Piwik PRO Tag Manager my question is If I want to use the google tag manager… do I have to create in google tag manager each one of the tags that already exist in Piwik?

I just want to know how to use google tag manager with the consent Popup Form of piwik

If all the tags are in Piwik PRO Tag Manager, then why would you use GTM? If you want to go that direction, you would have to do it via triggers and that would be a mess to manage.

A post was split to a new topic: Dedicated pre-checked consent category for necessary cookies