GA doesn't store referrer properly when loaded from script

Created on 5 June 2024, 7 months ago

Problem/Motivation

We would like to have the correct google analytics data for our website and comply to GDPR and Google Consent v2.

Somehow the source traffic is changed when a user approves cookies by the eu_cookie_compliance module, interconnecting with this great GA module.
A EU_CC maintainer stated earlier: https://www.drupal.org/project/eu_cookie_compliance/issues/3184541 🐛 Module causes Google Analytics to interpret traffic as direct instead of organic (no referrer) Closed: outdated
"This also isn't really a bug on our side, but in the GA module that doesn't store referrer properly when loaded from script."

Steps to reproduce

Implement eu_cookie_compliance and setup
Implement google analytics and setup
Look what happens with google analytics monitoring and see that referrer is not stored properly

Proposed resolution

Store referrer proper, as such that direct traffic stays direct, and affiliate traffic is stored as such.

greetings,

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands Summit

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

Comments & Activities

Production build 0.71.5 2024