a-digital / cookie-consent-banner

Add a configurable cookie consent banner to the website.
MIT License
11 stars 13 forks source link

Google Ads campaign tracking problem #49

Open arentsen opened 6 months ago

arentsen commented 6 months ago

A Google Ads campaign of a client of mine seems to have problems with tracking. I don't know the exact error but is this a known issue? They said that they need a Google compatible cookie banner, such as Cookiebot. Any feedback would be greatly appreciated.

aarmitage commented 6 months ago

We've not had any other comments around tracking so it's not a known error. I'm not a developer myself anymore so I'd need to check on the specific functionality if you feel there's a problem.

I'm not sure there'll be such a thing as a Google compatible banner, but not going to say there isn't one. Obviously there are moves towards server-based cookies, but to my knowledge, all cookies are set in the same way with the Set-Cookie header which is the premise around how the plugin works.

aarmitage commented 5 months ago

So I've been looking over this and you're right about the introduction of a Google compatible Cookie Banner. CookieBot is one of these and while the integration will probably be quick and easy given it's an approved solution, it comes with a fee of £11 per month for any site over 50 pages, ranging up to £41 per month.

There's still room for independent solutions, so we'll be taking a look at this based on the guidance at https://support.google.com/analytics/answer/14275483 and https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#gtag.js_2.

This plugin remains free and I should state we're not experts in the field of consent which seems to be getting more complex, so there'll be some learning to look in to which means we can't commit to a resolution time at the moment.

arentsen commented 5 months ago

Thanks for responding, much appreciated!

MalcolmJohnston commented 2 months ago

If you are using Google Tag Manager then you can work around this issue.

The steps are as follows:

Change the Cookie Consent Banner plugin to “Opt-In” mode

This records Cookie Consent in a Cookie – either allow or deny

Using Google Tag Manager

  1. Setup Default Consent Mode Tag (i.e. denied for advertisement and analytics)
  2. Setup Cookie Consent Variable (this reads from the Cookie added by Cookie Consent Banner)
  3. Setup Cookie Consent Lookup Variable (this converts allow/deny from our Cookie to granted/denied for Google)
  4. Setup Update Consent Mode Tag (this updates consent based on the Cookie lookup)
  5. Enable Consent Overview in Google Tag Manager (this is a tool from Google which allows us to manage the Consent status of all our tags)
  6. Configure Consent required for all the tags in the Workspace using the Consent Overview feature

There is an excellent video (see below) that covers these steps in far more detail, and should help work around your issue with Cookie Consent Banner.

https://www.youtube.com/watch?v=yZjGzfWDc0Y

The above solution should scale if Cookie Consent Banner adds some more features in future (i.e. controls for granular consent).