Proposal: Add Google Tag Manager (GTM) support to plugins #1058
ryota-yamada-jp
started this conversation in
General
Replies: 1 comment
-
|
Good idea. Also if/until they add that feature, if you're using Cloudflare they have tag management builtin just search for "zaraz" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I would like to propose adding Google Tag Manager (GTM) support as a built-in feature or official plugin for
emdash.Google Tag Manager is widely used for managing marketing tags, analytics, and tracking pixels without needing to modify the core codebase directly. Integrating it will significantly improve the analytics and marketing capabilities for users running websites on
emdash.As a digital marketing expert with over 10 years of experience working with GTM, I have designed this integration to follow best practices for performance and tracking accuracy.
Proposed Solution
I propose adding a new GTM plugin with the following configuration options:
GTM-XXXXXXX) to automatically inject the required scripts into the<head>and<body>.dataLayervariable (e.g., tocustomDataLayer) to prevent naming conflicts with other scripts.gtm.js(custom domain/source URL) to fully support Server-Side GTM setups.Alternative Considered
Users can currently inject the script manually via custom code blocks or themes, but having a dedicated plugin makes it much more user-friendly, less error-prone, and aligned with standard CMS plugin practices.
Additional Context
I have already implemented this feature and inadvertently opened a Pull Request for it beforehand. I will link this Discussion to that PR as soon as it receives your approval!
Beta Was this translation helpful? Give feedback.
All reactions