Multilingual Data Layer
Configure a custom window.dataLayer payload for every enabled Drupal language using YAML—without writing PHP or JavaScript.
Features
- Provides optional global YAML and one YAML field for each enabled language.
- Lets site builders choose their own keys, values, nested objects, and lists.
- Merges language-specific values over shared global data.
- Can add the current request URI and Drupal language ID under configurable keys.
- Shows a JSON preview of the merged YAML for each language.
- Safely initializes
window.dataLayerand pushes one object. - Produces no script when the effective payload is empty.
- Provides an alter hook for developers who need additional logic.
The module supplies data only. It does not install Google Tag Manager, add a container snippet, or send analytics events.
Post-installation
Go to Configuration > Regional and language > Multilingual Data Layer. Add optional shared YAML, then add values for each language that needs them. Save the form and inspect the previews or window.dataLayer in the browser.
Additional requirements
Requires the Drupal core Language module. No external service or JavaScript library is required.
Recommended modules/libraries
Use a Google Tag Manager or other analytics integration when the configured values need to be collected externally.
Similar projects
The Data Layer project exposes entity, field, taxonomy, user, and page metadata. The GTM dataLayer project provides broader Google Tag Manager integration. Multilingual Data Layer focuses on administrator-authored payloads that can differ by Drupal language.
Supporting this module
Use the project issue queue to report bugs, request features, or contribute improvements.
Community documentation
Installation, configuration, extension, and privacy guidance is included in the project README.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta1 | Pre-release | 10–11 | Initial beta with configurable global and per-language YAML data layer payloads. | Sep 10, 2026 |