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

Comments

KarlShea created an issue. See original summary.

visios’s picture

Experiencing the same problem here Drupal 9.5.9.

pookmish’s picture

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.

pookmish’s picture

japerry’s picture

Status: Active » Closed (works as designed)

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.

karlshea’s picture

> 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.

pookmish’s picture

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.

mradcliffe’s picture

Category: Bug report » Task
Priority: Critical » Major
Issue summary: View changes
Status: Closed (works as designed) » Active

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.

mradcliffe’s picture

Issue summary: View changes

Fixed typo.

damienmckenna’s picture

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