Google Tag 1.7 breaks analytics

Created on 1 August 2024, 4 months ago

Updating to Google Tag 1.7 breaks the site's connection with Google Analytics. No errors are reported β€“ Analytics suddenly just stops being tracked. The lack of errors or warnings that something is wrong causes us to lose analytics data for weeks at a time, before someone catches the issue – so this is a big problem for us. Reverting to Google Tag 1.6 solves the issue. I haven't found any similar issues reported.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmod

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

Comments & Activities

  • Issue created by @cmod
  • πŸ‡ΊπŸ‡ΈUnited States cmod
  • Status changed to Active 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States solotandem

    The community bug reporting guidelines indicate the burden of showing cause and effect is on you. So far you have reported an undesirable outcome, but have not indicated the cause. That makes this a support request.

    Have you confirmed that the snippet insertion conditions render true so that a snippet is placed on the page? (You can turn on the debug output in this module to see which conditions return true and false.) Is the google tag js on the page but analytics are not being recorded? If you can provide some details like these, then maybe we can figure out the cause.

    Also, needs work only applies if there is a patch or merge request in play.

  • Status changed to Closed: won't fix 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cmod
  • πŸ‡³πŸ‡±Netherlands borisr

    I recently saw a similar issue. In my case the problem was that the 'hostname' value was not set, probably due to not (or not correctly) executing database update 8104 or due to a forgotten config export / import after update 8104. Manually setting the correct value resolved the issue.

  • πŸ‡ΊπŸ‡ΈUnited States alphex Atlanta, GA USA

    Well, I just had a client report that GA via GTM wasn't reporting anything since Late May of 2024. I verified that GTM' scripts were not showing up at all on the site.

    I just updated to 2.0.x, and the scripts started loading.

    So, this is something thats happening.

  • πŸ‡ΊπŸ‡ΈUnited States gettysburger

    In comment #5 borisr said that he added the Host Name. I am having the same issue in that when I upgraded to 8.1.7 it stopped tagging, and I have www.googletagmanager.com as the Host name. Is this correct? It says that it is the default. Thanks.

  • πŸ‡³πŸ‡±Netherlands borisr

    For most implementations the host name will be 'www.googletagmanager.com'. This was also the default setting in older versions of this module.

  • πŸ‡ΊπŸ‡ΈUnited States gettysburger

    Thanks for the reply. Now I just need to figure out if it is possible to get this working with 8.1.7 and if so, why mine is not working.

  • πŸ‡³πŸ‡±Netherlands borisr

    You can set the host name under the 'advanced' tab on both the global settings page and in the individual container settings pages. That should resolve the issue with the Google Tag Manager(s) not loading.

    I just did a quick test with the Google Analytics module and the Google Tag Manager module and as far as I can tell there are no conflicts in loading the scripts.

  • πŸ‡ΊπŸ‡ΈUnited States gettysburger

    Thanks I see where to set the Hostname on the Advanced tab but not on the General tab. I am going to install the Google Analytics module because on another site that has that module, the General tab has a vertical tab that says Request Domain. That vertical tab is not available on my site.

  • πŸ‡³πŸ‡±Netherlands borisr

    That's correct. You should be able to set the hostname under the global module settings advanced tab and under the advanced tab on the individual container settings.

  • I just had a client inform me that Google Analytics had not reported any data for a month. After investigating it turns out after updating to 1.7 the GTM code was not added to any page of the website. In the settings for the module I noticed that the required "hostname" default field had a placeholder value of "www.googletagmanager.com" but that the field was actually empty. After adding the value, it worked as expected.

Production build 0.71.5 2024