Better GDPR compliance: Fix Do not track & EU Cookie Privacy integration

Created on 7 June 2019, over 5 years ago
Updated 4 March 2024, 9 months ago

First of all thanks a lot for this great module, which we're using since Drupal 6 with so many wonderful options.

Since GDPR is a major topic in EU countries, we're lacking a proper solution for several points when using Google Analytics with this module, for example:

  • No proper integration with EU Cookie Compliance
  • Do-Not-Track only works for logged in users and without static caching (doesn't work with boost e.g.)
  • Cookies were set and (with local caching for GA Tracking code disabled) the tracking code was loaded from the Google servers if we used workarounds for GDPR compliance.

That reflects in a lot of issues in this module with many hacky workarounds posted, but no well working solution for end-users.

Drupal 8 issues:

#2917905: Add JS-function / method to set ga-disable-...
#2805127: DoNotTrack privacy feature

Drupal 7 issues:

#2173433: No GA code with alternative page caching engines and DNT header
#2971644: Eu cookie compliance support

This issue is a try to finally fix these typical problems with two patches, because it makes sense to combine the solution in a runtime JavaScript solution to allow static caching to work and also make interaction with other modules like eu_cookie_compliance possible. Because eu_cookie_compliance is widely used, I decided to also add it to the admin UI to have a better user experience for non-devs.

Here
Drupal 7:

Drupal 8:

So please help to push #2986131: JS loads too late to affect Google Analytics for Drupal 8!

Please test, review and comment the patch and please help adding tests so that we can roll this out for Drupal 8 and Drupal 7 as soon as possible.

Thank you all!

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024