default_google_tag_entity config is not respected when loading tags

Created on 22 May 2024, 7 months ago

Problem/Motivation

default_google_tag_entity option of google_tag.settings config is not respected when rendering gtm containers on frontend.
I would like to be able to put empty default tag in settings file to override default config for testing purposes.

Steps to reproduce

  1. Configure GTM tag and save
  2. Check that it works correctly on frontend
  3. Add the following to settings file:
    // Disable GTM.
    $config['google_tag.settings']['default_google_tag_entity'] = '';
  4. Double check that config is actually overwritten: drush cget google_tag.settings --include-overridden
  5. Check frontend and observe that nothing changed

Proposed resolution

Add condition that respects default_google_tag_entity config option on frontend

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇱Netherlands aposudevsky Eindhoven

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

Comments & Activities

Production build 0.71.5 2024