This module integrates Google Tag Manager's dataLayer with Drupal's Metatag module. It enables you to define and output custom dataLayer variables for Google Tag Manager, similar to how the Schema Metatag module outputs structured data.
This module allows Google Tag Manager dataLayer objects to be displayed using Drupal's Metatag module. It follows the same architectural pattern as the Schema Metatag module, but outputs to the GTM dataLayer instead of JSON-LD structured data.
Dependencies
Features
How it works is add to a page (content type, taxonomy term, or similar) you want to use it with. The module by itself doesn't add any custom objects for use with a datalayer.
This module is meant to help those who use Metatag and Google Tag to set up custom variables for GTM's datalayer.
Post-Installation
Create a custom module that has a plugin to define your custom variables. If you use Schema Metatag module; then you have a good idea how to make this work.
Similar projects
Supporting this Module
We are looking into further help to improve and maintain this module. Please contact one of the maintainers.
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the GTM ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Initial version | Sep 10, 2026 |