A Craft CMS plugin that lets you configure Google Tag Manager across all sites in a multi-site setup with a single action — and optionally sync any other SEOmatic global settings from your primary site to all other sites.
Package: digitalpulsebe/craft-gtm-seomatic
Handle: gtm-seomatic
- Craft CMS 5.x
- PHP 8.3+
- nystudio107/craft-seomatic ^5.1
- A multi-site Craft installation
Install via Composer:
composer require digitalpulsebe/craft-gtm-seomaticThen enable the plugin in the Craft control panel under Settings → Plugins.
- GTM ID management across all sites — Enter your GTM Container ID once and save it to every site's SEOmatic global bundle in one step. Enables or disables the GTM script on all sites simultaneously.
- SEOmatic section sync — Copy any combination of SEOmatic global settings (meta tags, scripts, JSON-LD, site identity, sitemap config, etc.) from the primary site to all other sites. Useful after making changes to the primary site that should propagate everywhere.
Navigate to Utilities → GTM for SEOmatic in the Craft control panel.
- Toggle Enable Google Tag Manager on or off.
- Enter your GTM Container ID (format:
GTM-XXXXXXX). - Click Save — the ID and enabled state are written to every site's SEOmatic bundle immediately.
A badge appears on the utility icon when no GTM ID has been configured yet.
- Select the SEOmatic sections you want to copy from the primary site.
- Click Sync to all sites.
Available sections:
| Section | What it covers |
|---|---|
| General | Meta global vars |
| Site identity | Meta site vars |
| Sitemap | Sitemap configuration |
| Bundle settings | SEOmatic bundle settings |
| Frontend templates | Frontend template overrides |
| Meta tags | <meta> tag containers |
| Meta links | <link> tag containers |
| Title | <title> container |
| Scripts | Script containers (including tracking scripts) |
| JSON-LD | Structured data containers |
Note: Existing values on all non-primary sites will be overwritten for the selected sections.
Developed by Digital Pulse.
Built on top of SEOmatic by nystudio107.