GTM4WP - A Google Tag Manager (GTM) plugin for WordPress

duracelltomi-google-tag-manager · Von Thomas Geiger
700k+ Installationen 4.5 (155) Aktualisiert vor 4 Tagen v2.0.2 WP 6.3–7.1.1 PHP 8.0+

Auswirkungsbewertung

Footprint Score in den beiden repräsentativsten Kontexten.

Homepage-Score

Auswirkung auf der öffentlichen Startseite

···
v1.22.5 · 3 Scans
Konsolidierte Bewertung über 90 Tage · 2 Versionen
Unzureichende Daten zur Veröffentlichung der Bewertung (15 Scans min., aktuell 3).
Zeit
0 ms
Speicher
0.0 MB
SQL
+1
Assets
2
HTTP ext.
0

Admin-Score

Auswirkung im WordPress-Admin

···
v1.22.3 · 1 Scan
Konsolidierte Bewertung über 90 Tage · 1 Versionen
Unzureichende Daten zur Veröffentlichung der Bewertung (15 Scans min., aktuell 1).
Zeit
24 ms
Speicher
0.0 MB
SQL
+0
Assets
0
HTTP ext.
0

Über

Google Tag Manager (GTM) is Google’s free tool for everyone to manage and deploy analytics and marketing tags as well as other code snippets
using an intuitive web UI. To learn more about this tool, visit the official website.

This plugin places the GTM container code snippets onto your WordPress website so that you do not need to add them manually.
Multiple containers are also supported, and each container can have its own environment parameters, custom domain and custom path.

The plugin complements your GTM setup by pushing page meta data and user information into the so-called data layer.
Google’s official help pages include more details about the data layer.

Mehr lesen

PHP 8.0 and WordPress 6.3 are required to use this plugin.

The original GTM container code is divided into two parts:

The first part is a javascript code snippet that is added to the <head> section of every page of the website.
This part is critical to enable all features of GTM, and this plugin helps to place this part
correctly on your site.

The second part is an iframe snippet that acts as a failsafe/fallback should users‘ JavaScript be disabled.
Google recommends – for best performance – to place this code snippet directly after the opening <body> tag on each page.

Albeit not ideal, it will work when placed lower in the code. This plugin provides a code placement option for the second code snippet.

If your WordPress theme is compatible with the additions of WordPress 5.2, then this plugin will place this second snippet in the right place.
Users of the Genesis theme, GeneratePress theme, Elementor, Oxygen Builder and Beaver Builder Theme will also have it placed correctly.
To utilize this, set the compatibility mode in the plugin options to off.

All other users can place this second code snippet using custom PHP code (the „Manually coded“ option), or select the so-called „Footer“ option
to add the code lower on the page (this is not the recommended way, but it will work).

Optional page variables that help with behavior tracking and Google Analytics 4 content grouping:

Data is collected in the browser using User-Agent Client Hints and pushed as a gtm4wp.deviceData event.
Note that Safari and Firefox expose less detail than Chromium based browsers.

Track users‘ interactions with any embedded media:

You can choose to fire data layer events when the media player loads, when the media is played, when it is paused or stopped,
and optionally when the user reaches 10, 20, 30, …, 90, 100% of the media duration. Each event also populates Google Tag
Manager’s built-in Video variables (Video Status, Video URL, Video Title, Video Provider, Video Duration, Video Current Time,
Video Percent, Video Visible).

Tracking is supported for embedded media using the built-in oEmbed feature of WordPress, as well as most other media plugins
and copy/pasted embed codes. Players inserted into the page after it has loaded (for example in a popup, a lightbox or via
AJAX) can also be tracked by turning on the optional „Track dynamically inserted players“ setting.

To increase website security, you have the option to allowlist or blocklist tags, triggers and variables.
You can prevent specific tags from firing, or prevent the use of certain variable types, regardless of your GTM setup.

If the Google account associated with your GTM account is compromised, an attacker could easily
execute malware on your website without accessing its code on your hosting server. By blocklisting custom HTML tags,
custom JavaScript variables and sandboxed scripts (custom tag and variable templates), you can secure the Tag Manager container.

Google Tag Manager for WordPress integrates with several popular plugins. More integrations to come!

If you are using a server side container,
you can enter your custom domain name and custom path to load gtm.js from there. Both can be set per container, so you can mix
server side and standard containers on the same site.

(experimental, off by default)

On sites using a full page cache (LiteSpeed, WP Rocket, Varnish, Cloudflare APO), the HTML generated for one visitor is served
to everyone else as well. Any visitor specific value written into the data layer would therefore leak to other visitors – the
classic example being a page cached while an editor was logged in, then served to anonymous visitors with that editor’s email
address and role still in the data layer.

When this option is enabled, no visitor or session data is written into cacheable HTML at all. Those values are delivered in the
browser instead, under the same data layer variable names, so your existing Google Tag Manager setup keeps working.

You can export all plugin settings into a JSON file and import them on another site, which makes it easy to roll out the same
configuration across several websites. Imported files are treated as untrusted and every value is validated before it is stored.

You can set which user roles need to be excluded from tracking when a user with that role visits the frontend. This will completely disable the container code for that user.

The container can be limited to production environments only, so a cloned or staging copy of your site does not send data into
your production Google Tag Manager container. This relies on the WP_ENVIRONMENT_TYPE setting of WordPress.

Version 2.0 is a complete object oriented rewrite. Every feature is a module, and third party plugins can register their own
modules through the gtm4wp_register_modules action. All public template functions, filter and action names, wp-config constants
and the option storage key of the 1.x versions are unchanged, so existing integrations keep working.

Tags
google ads google analytics google tag manager gtm tag manager

Screenshots

Vom Autor bereitgestellte Vorschauen von wordpress.org.

Admin panel
Admin panel
Basic settings
Basic settings
Veranstaltungen
Veranstaltungen
Integration panel
Integration panel
Advanced settings
Advanced settings

Historie nach Version

Versionsdetails anzeigen (2 Versionen)

Wie sich das Plugin von Version zu Version entwickelt.

Version Homepage Admin Letzter Scan
v1.22.5 1 Scan vor 4 Wochen
v1.22.3 2 Scans 1 Scan vor 1 Monat

Alternativen in derselben Kategorie

Weitere Plugins der Kategorie analytics, von der Community gemessen, vom leichtesten zum schwersten sortiert.

Scan-Verlauf

Einzelnes Scan-Protokoll anzeigen (4 Scans)

Datum Version Kontext Score Bewertung Zeit Speicher
vor 4 Wochen v1.22.5 Homepage 98/100 A 0 ms 4.0 MB
vor 1 Monat v1.22.3 Admin 97/100 A 24 ms 0.0 MB
vor 1 Monat v1.22.3 Homepage 99/100 A 0 ms 0.0 MB
vor 1 Monat v1.22.3 Homepage 99/100 A 0 ms 0.0 MB