RE-Enable Google Consent Mode settings to be customised

Created on 12 December 2023, about 1 year ago
Updated 12 April 2024, 8 months ago

It seams that changes from
https://www.drupal.org/project/cookiebot_gtm/issues/3378719 āœØ Enable Google Consent Mode settings to be customised Fixed
are overridden on
https://www.drupal.org/project/cookiebot_gtm/issues/3381424 šŸ› Reordering of script loading (v1.0.9) breaks Google Analytics Fixed
https://git.drupalcode.org/project/cookiebot_gtm/-/commit/32c9c8f5862d16...

This patch re-adds the missing code of https://www.drupal.org/project/cookiebot_gtm/issues/3378719 āœØ Enable Google Consent Mode settings to be customised Fixed

Without the patch cookies served prior user's consent.

āœØ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

šŸ‡¬šŸ‡·Greece fotisp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @fotisp
  • šŸ‡³šŸ‡±Netherlands roaldnel

    Thank you for your input fotisp. If you read the motivation behind the reversal of the code changes here - https://www.drupal.org/project/cookiebot_gtm/issues/3381424 šŸ› Reordering of script loading (v1.0.9) breaks Google Analytics Fixed , you should note that the patches introduced issues with Google Analytics (GA). Unless we can implement these changes in a way that does not negatively impact GA we cannot re-introduce this into the production code. If you have suggestions to adapt the previous patch in a way that can accommodate GA then you are welcome to post it here. Still, this is a good ticket that we can use to explore options on how to resolve this issue.

  • Status changed to Needs work 11 months ago
  • šŸ‡³šŸ‡±Netherlands roaldnel

    I have updated this task to needs work.

  • Issue was unassigned.
  • šŸ‡³šŸ‡±Netherlands batigolix Utrecht
  • Status changed to Postponed: needs info 11 months ago
  • šŸ‡³šŸ‡±Netherlands batigolix Utrecht
  • šŸ‡¬šŸ‡·Greece fotisp

    Thank you for the message.
    Can you give me more information about what problems it is causing?
    On 2 sites where I run the module with the patch,
    I see the Google Analytics counting correctly if the user clicks 'allow statistics cookies' in Cookiebot.
    Ī™f they don't give consent for statistics, the GA cookies are not set, and Google Analytics doesn't function.
    Isn't this what we want?
    Am I missing something else?
    Thanks

  • Assigned to roaldnel
  • Status changed to Needs review 10 months ago
  • šŸ‡³šŸ‡±Netherlands roaldnel

    Thank you for your feedback, this really helps. I have created an improved patch that strips out the changes that were introduced in v1.0.8 (see https://www.drupal.org/project/cookiebot_gtm/issues/3367888 šŸ“Œ GTM needs to load before the Cookiebot script Fixed ) so this specific feature can be tested in isolation. I also added an enabled / disabled selector to the config form that way it can be turned off if need be. The patch is attached.

    The main issue was that our client was complaining that their GTM stats were not working as expected. Until now I have not had too much time to investigate this in too much detail but I suspect that the more strict blocking was functioning as it should but it was just not the expected result. That being said, I tend to agree with you that it does what you would expect. Regardless, now that the functionality can easily be disabled I think we can give it another go so let's see how this patch fares and hopefully we can include it in a release asap.

  • Open in Jenkins ā†’ Open on Drupal.org ā†’
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 10 months ago
    Build Successful
  • šŸ‡³šŸ‡±Netherlands roaldnel

    I have updated the patch to update the script to Google Consent Mode v2 (see https://www.cookiebot.com/en/google-consent-mode-v2-integration/).

  • šŸ‡³šŸ‡±Netherlands batigolix Utrecht
  • šŸ‡¬šŸ‡·Greece fotisp

    Hello, patch #10 seams to work great.
    Did not had the chance to check each option (ad_storage, analytics_storage) but
    the "Enable Google Consent mode" works fine with a GTM container with GA4 tracking.
    Thanks

  • Status changed to RTBC 9 months ago
  • šŸ‡³šŸ‡±Netherlands roaldnel

    We have tested this patch on a variety of projects and based on the feedback from fotisp this is now considered to have been reviewed and tested.

  • Status changed to Fixed 9 months ago
  • šŸ‡³šŸ‡±Netherlands roaldnel

    This has now been released in version 1.0.16.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024