inconsistent _ga cookie behavior with version 2.x

Created on 7 June 2023, over 1 year ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

We are noticing _ga cookie behavior that seems like it could be an issue with the 2.x version of the module, but we are not sure if this is expected behavior.

In the 1.x version of the Google Tag module, the module places a _ga cookie in the browser of site visitors.

In testing, we are finding that the new 2.x version of the module only places a cookie if you input a Google Analytics tag in the module configuration, but does not place a cookie if you input a GTM container ID in the module configuration. The GTM container ID does show up in the head and traffic data does get sent through to Google Analytics, but we are concerned that the absence of the browser cookie may cause inaccurate data.

Is this a bug or is this expected behavior?

Steps to reproduce

1. Use a GTM container ID with the 1.x version of the Google Tag Manager module.
2. Observe that a _ga browser cookie is placed when visiting the site.
3. Update to the 2.x version of the Google Tag Manager module
4. Clear browsing data and visit the site again. Observe that no _ga cookies appear in the browser.
5. Inspect the source and confirm that the GTM container ID is present in the head.
6. Check Google Analytics and confirm that traffic data is still coming through.
7. Switch the 2.x Google Tag configuration to use either a UA or GA4 tag instead of a GTM container ID.
8. Clear browser cookies.
9. Visit site again and confirm that a _ga cookie is placed.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States kkohlhase

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

Comments & Activities

Production build 0.71.5 2024