Skip to content

Integrate Google Tag Gateway toggle to Tag Manager settings screen #11415

@hussain-t

Description

@hussain-t

Feature Description

Currently, Google tag gateway for advertisers (GTG) is available as a centralized setting for Analytics and Ads. Tag Manager users should be able to enable/disable GTG directly from the Tag Manager settings edit screen, providing a more intuitive and module-specific configuration experience while maintaining the centralized GTG setting. This means if GTG is enabled in GTM, it will be enabled in Analytics and Ads and vice versa.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The Google tag gateway for advertisers Toggle component should be integrated into the Tag Manager module's settings form.
  • The toggle should allow users to enable or disable Google tag gateway for advertisers.
  • The toggle should default to the current GTG state for existing users.
  • The toggle should be wrapped with the Improve your measurement container, similar to the one in the Analytics and Ads modules.
  • If either the GTG health check or script access check fails, the toggle should be disabled and grayed out.
  • If either the GTG health check or script access check fails, a notice should be displayed below the toggle to inform the user about the server requirements, similar to the one in the Analytics and Ads modules.
  • Changes made to the toggle state (on/off) should save the GTG settings in the datastore and persist them on the server.
  • The toggle should display server requirements warnings when GTG cannot be enabled.
  • If the GTG is enabled in GTM, it should be enabled in Analytics and Ads, and vice versa.
  • All the above behaviors should be consistent with the Analytics and Ads modules.

Implementation Brief

In assets/js/modules/tagmanager/components/settings/SettingsForm.js:

  • Import and render the new GoogleTagGatewayToggle if the googleTagGateway feature flag is enabled as the last item in the settings form.
  • Wrap the GoogleTagGatewayToggle with the SettingsGroup component (Improve your measurement container).

In assets/js/googlesitekit/datastore/site/google-tag-gateway.js:

  • Update isAnyGoogleTagGatewayModuleConnected selector to check if the Tag Manager module is connected in addition to the Analytics and Ads modules.

Test Coverage

  • No new tests are needed.
  • Add new stories for the GTG toggle in the Tag Manager settings edit screen, similar to the ones in the Analytics and Ads modules.

QA Brief

  • Set up Site Kit with the googleTagGateway feature flag enabled.
  • Connect the Tag Manager service and navigate to its settings edit screen.
  • Confirm the Improve your measurement section is present and includes the toggle and health check notice, which are fully functional as per the AC.

Changelog entry

  • Add Google Tag Gateway toggle to Tag Manager settings edit screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: Tag ManagerGoogle Tag Manager module related issuesP0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions