Elevate your website analytics with the DataLayer plugin! This robust plugin creates a fully populated and standardized dataLayer object, ensuring seamless integration with both Google Tag Manager and Matomo Tag Manager. Instant Setup: Automatically generates and populates a dataLayer object with es
PricingFree downloadThe WordPress.org download is free. Pro versions, add-ons or external services may cost extra.
CompatibilityRequires WordPress 6.0 and PHP 7.2.
SourceWordPress plugins · Oct 30, 2026
01 / Source details
Aboutthistool.
Elevate your website analytics with the DataLayer plugin! This robust plugin creates a fully populated and standardized dataLayer object, ensuring seamless integration with both Google Tag Manager and Matomo Tag Manager.
Instant Setup: Automatically generates and populates a dataLayer object with essential website and user interaction data.
Universal Compatibility: Works flawlessly with Google Tag Manager and Matomo Tag Manager, making it easier to manage your tagging needs.
Customizable Data: Easily add or modify data points to fit your specific tracking requirements.
Performance Optimized: Lightweight and optimized for speed to ensure your site remains fast and responsive.
Get a quick look at all the generated structures!
Archive page `dataLayer` structure
Easy access to your archive data with a standard event name and subject.
The search key in this object allows you to get the search term and total results to detect invalid searches. Very useful for Matomo Tag Manager, and nice hack for Google Tag Manager.
As each event handles wpcf7_form_details , here is an example of the object values when the form is submitted with invalid fields.
"wpcf7_form_detail": { "contactFormId": 145, "pluginVersion": "6.0.3", "contactFormLocale": "en_US", "unitTag": "wpcf7-xxxxxx", "containerPostId": 0, "status": "validation_failed", "inputs": [ { "name": "your-message", "value": "" }, { "name": "your-name", "value": "" }, // All other inputs ], "formData": {}, "apiResponse": { "contact_form_id": 145, "status": "validation_failed", "message": "One or more fields contain an error. Please check and try again.", "invalid_fields": [ { "field": "your-name", "message": "Please complete this field..", "idref": "last_name", "error_id": "wpcf7-f145-o1-ve-your-name" }, { "field": "your-first-name", "message": "Please complete this field.", "idref": "first_name", "error_id": "wpcf7-f145-o1-ve-your-first-name" }, // All other invalid fields ], "posted_data_hash": "", "into": "#wpcf7-f145-o1" } }
Plugin : WP Forms `dataLayer` structure
{ event: 'wp_forms_submit', wp_forms_form_detail: {} // the HTML tag found in DOM }
02 / Source details
Gettingstarted.
To start using the dataLayer plugin, you need to install it from the marketplace or manually. Then activate the plugin in the WordPress administration. You don’t need to configure anything special for standard use. Once the plugin is activated, you will need to understand the different structures of the generated dataLayer object.
In your favorite Tag Manager:
01To trigger a tag at a specific moment, you will need to create a trigger based on the value of the event key of the desired page.
02To read values from the dataLayer object and report them to your audience analysis tools, you will need to create custom variables of the “data layer” type and enter the full path.
Example of configuring a variable: for a following datalayer object:
{ "event": "view_single_post", "page": { "type": "post", "id": 1, "url": "https://example.com/blog/super-article-path", "path": "/blog/super-article-path", "title": "Super article title | Example", "post_type": { "name": "post", "label": "Posts", "label_singular": "Post", "label_plural": "Posts", "description": "The super post type description" } } }
To collect the post type label, you will need to enter the value page.post_type.label in your custom variable. This variable should be triggered with a custom trigger based on the custom event view_single_post .
Job done !
03 / Source details
Frequently asked questions.
Is this plugin compatible with Google Tag Manager?
Yes of course, this plugin fills the data in the dataLayer object by default for GTM
Is this plugin compatible with Matomo Tag Manager?
Yes, even though this plugin fills data into the dataLayer object by default for GTM, your Matomo Tag Manager instance is able to read this data if you enable the container option: “Actively sync from Google data layer Tag Manager”. NO specific configuration required. (Your Matomo instance must be at least updated to Matomo >=5.2.0)
Is it possible to change the default dataLayer structure?
Yes, you can use all filters and actions available in the plugin source code to extend and adapt this plugin to your needs.
How to visualize the contents of the data layer?
If you want to check what data is available in the dataLayer, you can open your console tab (F12) in your browser. Then type dataLayer and press the “Enter” key. Your browser displays the dataLayer object with all the data it contains.
You can also use the Tag Assistant tool from Google to visualise your dataLayer with ease in a fancy user interace.
How to track forms submission using this plugin?
If your website uses the WP Contact Form 7 or WP Forms plugin, this plugin will automatically detect form events. The list of all events is available in the documentation of this plugin.
Website LLMs.txt and LLMs-Full.txt Generator is an LLMs.txt generator and llms-full.txt generator for WordPress. It helps site owners generate, manage, preview, validate, and serve AI discovery files from published public content. Use it to create structured /llms.txt and optional /llms-full.txt end
EngageDock AI is a customizable floating contact widget for WordPress websites that want more leads and faster visitor communication. It helps small businesses turn website traffic into calls, texts, emails, and callback requests from one clean contact panel. Key Features: Click-to-Call – One tap ca
Altify AI is an auto ALT text and AI ALT text plugin for WordPress images. It helps generate descriptive image ALT text for accessibility and image SEO. Use bulk image ALT text tools for your Media Library, generate featured image ALT text automatically, and scale WooCommerce image ALT updates with
The Accepted Payment Methods plugin is a straightforward, lightweight solution that enhances your website by displaying visually appealing icons of the payment methods you accept. This plugin is ideal for a variety of websites, including e-commerce platforms, service-oriented websites, and informati