GA4 returning duplicated informations / tarteaucitron documentation

Created on 20 June 2025, 22 days ago

Problem/Motivation

An agency is returning duplications for each GA4 events.
I'm trying to look for the reason this double information is returned to the agency tools.
The GA4 service is turned on Tacjs.
I also use another module: GTM with a specific layer.
When I look at the TACJS install documentation, il can read this for GA4:

āž• Code to add inside the website source code:

  <script>
    tarteaucitron.user.gtagUa = 'G-XXXXXXXXX';
    // tarteaucitron.user.gtagCrossdomain = ['example.com', 'example2.com'];
    tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ };
    (tarteaucitron.job = tarteaucitron.job || []).push('gtag');
  </script>

šŸ—‘ļø Code to remove from the website source:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXX"></script>
<script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());
 gtag('config', 'G-XXXXXXXXX');
 // your optionnal gtag()
</script>

When I look the source code, I can't find the suggested first code tarteaucitron.user.gtagUa = 'G-XXXXXXXXX'

Can you explain why the Drupal installation don't use the expected TarteAuCitron documentation ?

Do I use a deprecated documentation ? If so, please let me kknow which documention tacjs is using.

Best regards.

šŸ’¬ Support request
Status

Active

Version

6.7

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024