Incompatible with google_tag module

Created on 20 June 2023, over 1 year ago
Updated 1 March 2024, 10 months ago

Problem/Motivation

Configuration is not output to the page when google_tag module is installed.

Steps to reproduce

Install google_tag module, then view page source. Google Analytics tags are not on the page. Uninstall google_tag module, they re-appear.

Proposed resolution

Improved documentation about steps site owners need to do to switch to google_tag module.

Remaining tasks

Parse this comment by @japerry into documentation:

This is correct, the functionality of Google Analytics has been rolled into Google Tag 2.x. Once you run updb, you should not need to use Google Analytics anymore. This has been documented on the project page.

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

4.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

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

Comments & Activities

  • Issue created by @karlshea
  • πŸ‡©πŸ‡ͺGermany VISIOS

    Experiencing the same problem here Drupal 9.5.9.

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

    I believe this should actually be an issue with google_tag module. It contains a hook_module_implements_alter that unsets the google analytics hook which adds the GA code.

  • πŸ‡ΊπŸ‡ΈUnited States pookmish
  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    This is correct, the functionality of Google Analytics has been rolled into Google Tag 2.x. Once you run updb, you should not need to use Google Analytics anymore. This has been documented on the project page.

  • πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

    > This has been documented on the project page.

    Not really, it says "Users are strongly encouraged to use Google Tag 2.0+ instead. It supports all of GA4 and is the successor to this module."

    Many people would have had both installed at the same time, nowhere does it say that they're now suddenly incompatible with each other.

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

    I agree with KarlShea. There needs to be much greater documentation about the what happens when installing both modules at the same time. The current language provides no helpful information. It required actually tracing hook implementations for me to find where the conflict was.

  • Status changed to Active 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Based on the past few comments it looks like what needs to happen is some documentation to site administrators clarifying this process

    This is correct, the functionality of Google Analytics has been rolled into Google Tag 2.x. Once you run updb, you should not need to use Google Analytics anymore. This has been documented on the project page.

    It seems like the process is:

    1. Require drupal/google_tag drupal/google_analytics:4.0.2
    2. Install google_tag module(s).
    3. Run database updates?
    4. Uninstall google_analytics module
    5. Remove drupal/google_analytics

    If that's correct, then maybe that should be on the front page as well?

    I think this should be re-opened as a Major Documentation Task rather than a Critical Bug Report.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Fixed typo.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    The Google Tag module's project page and hook_requirements() should be updated to make this more clear, the current wording is unclear.

Production build 0.71.5 2024