Loading the library gtag.ajax in the header causes issues with other JS

Created on 2 December 2024, about 2 months ago

Problem/Motivation

Loading the library gtag.ajax in the header generates issues with JS from other modules so after a new Google Tag is added to the configuration, when we visit the homepage (or any page where the tag is loaded) there are multiple JS errors in the console.
We get errors even when disabling JS aggregation, they are less but there is at least one interference with Olivero.

Steps to reproduce

1. Enable the 2.0.x version of the module.
2. Go to the settings page, add a Google Tag container, save the settings.
3. Go to a page where the tag is loaded (for example the homepage)
4. Multiple JS errors are show (for example, some of them are related to Olivero, some could be related to Big Pipe).

Proposed resolution

Remove the "header: true" line from the libraries.yml file for the gtag.ajax.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡·Costa Rica dharizza

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024