Inconsistent loading of GTM script

Created on 27 June 2023, over 1 year ago
Updated 17 September 2023, about 1 year ago

Problem/Motivation

After upgrading to 2.x version, and also installing this patch ( https://www.drupal.org/project/google_tag/issues/3365395 πŸ› inconsistent _ga cookie behavior with version 2.x Fixed ), the gtm script is Sometimes is loaded and some other times it does not. This is an arbitrary situation we don’t find a pattern to. It also varies if there are query parameters in the URL.

Restoring to 8.x-1.x version the behaviour is the expected and is loaded in all pages.

πŸ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain emasclans Sabadell

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

Comments & Activities

  • Issue created by @emasclans
  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    Unfortunately, this is too vague to debug. I'd suggest trying the new release and putting reproduction steps in the issue.

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

    I'm not sure if OP's issue is related to mine. I found that if I enable `use_collection` for multiple containers, the module will still only add the first container. So I have to put all my GTM IDs into the one container for them to load as expected. This kinda defeats multiple containers.

    It might also be that OP isn't running the update since they said reverting solved the problem.

  • πŸ‡³πŸ‡ΏNew Zealand AndyD328 Lyttelton, NZ πŸ‡³πŸ‡Ώ

    I also had this and am also not sure if it is related.

    It turned out that there was a second container hanging around in the config from an upgrade from v1.x
    We uninstalled and re-installed so that the old container config was removed and it now appears to be working as expected.

Production build 0.71.5 2024