WordPress plugin intelligence profile

DataLayer for GTM and Matomo

Add contextual information to dataLayer for GTM and MTM

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.0.5
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.0 · PHP 7.2
Directory statusactive
Last directory update6 Oct 202627d ago
Active installations80Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records DataLayer for GTM and Matomo version 1.0.5 as active, updated 27d ago and tested up to WordPress 7.1.

Overview

About this plugin

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.

com/2025/01", "path": "2025/01", "locale": "en_US", "archive_type": "date", "taxonomy": false, "post_type": false, "date": { "year": 2025, "month": 1, "day": null } } }

Author page `dataLayer` structure

Easy access to all author details on his archive page.

com/author/openmost", "path": "author/openmost", "title": "Author: openmost" } }

Error page `dataLayer` structure

This dataLayer structure allows you to easily track the 404 error and detect the referring page that led to this error.

What a great trick yeah?

com/url-that-encountered-a-404-error", "path": "/url-that-encountered-a-404-error", "locale": "en_US", "error_type": "404", "http_status_code": 404 } }

Search results page `dataLayer` structure

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.

com", "path": "", "title": "You searched for Demo - Example", "locale": "en_US" }, "search": { "search": "Demo", "search_cat": "", "search_count": 3, "query": "Demo", "found_posts": 3, "post_count": 3 } }

Home, Post Type `dataLayer` structure (blog posts, custom post type single page)

The following structure is generated for a single post page, but it automatically adapts to your custom post type, page, etc.

p=1", "post_mime_type": false, "comment_status": "open", "comment_count": "0", "author": { "id": 1, "nickname": "openmost", "display_name": "openmost", "first_name": "Ronan", "last_name": "HELLO", "description": "The creator of this super plugin" }, "taxonomies": { "category": { "name": "category", "label": "Categories", "description": "", "object_type": [ "post" ], "terms": { "Uncategorized": { "term_id": 1, "slug": "uncategorized", "name": "Uncategorized", "term_group": 0, "term_taxonomy_id": 1, "taxonomy": "category", "description": "", "parent": 0, "count": 1, "filter": "raw" } }, "primary_term": [] //Filled only with YoastSEO plugin } }, "category": [ "Uncategorized" ], "page_template": "" } }

Term and taxonomy page `dataLayer` structure

com/blog/category/uncategorized", "path": "blog/category/uncategorized", "locale": "en_US", "archive_type": "taxonomy", "taxonomy": "category", "post_type": "category", "date": { "year": null, "month": null, "day": null } } }

Pagination `dataLayer` structure

The pagination object structure is automatically added to all pages that have pagination.

Easy access to your pagination data, detect if users are using your pagination as much as you want.

{ pagination: { "posts_per_page": 10, "post_count": 1, "paged": true, "page_number": 2, "max_num_pages": 5 } }

Authenticated user `dataLayer` structure

The user object is automatically added to all page when user is logged in.

User hashed data with SHA256 is very useful for GDPR consent with Google Ads services and user provided data.

com", "user_registered": "2024-01-01 12:00:00", "display_name": "openmost", "roles": [ "administrator" ], "sha256_id": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b", "sha256_user_login": "b2754b994c2fb636d1943ac0170f4ea192a891fb0f09cfdd100a9ffa983f053d", "sha256_user_email": "679d031c25e557ee84ca86ecaf333ccd8d3d1a3900ee728da83d79a819daf535" } }

Plugin: Contact Form 7 `dataLayer` structure

This plugin automatically detects the use of WP Contact Form 7.

No configuration needed.

Form submitted

{ "event": "wpcf7_submit", "wpcf7_form_id": 145, "wpcf7_form_detail": {} // See wpcf7_form_details below }

Form with invalid fields

{ "event": "wpcf7_invalid", "wpcf7_form_id": 145, "wpcf7_form_detail": {} // See wpcf7_form_details below }

Form spamming detected

{ "event": "wpcf7_spam", "wpcf7_form_id": 145, "wpcf7_form_detail": {} // See wpcf7_form_details below }

Email sent successfully

{ "event": "wpcf7_mail_sent", "wpcf7_form_id": 145, "wpcf7_form_detail": {} // See wpcf7_form_details below }

Failed to send mail

{ "event": "wpcf7_mail_failed", "wpcf7_form_id": 145, "wpcf7_form_detail": {} // See wpcf7_form_details below }

As each event handles wpcf7_form_details, here is an example of the object values when the form is submitted with invalid fields.

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.

", "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 }

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • google tag manager
  • analytics
  • datalayer
  • gtm
  • matomo
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.0 · PHP 7.2
Update activity6 Oct 202627d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

Version1.0.21.0.5
WordPress compatibility7.0.47.1.2
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.