hryvinskyi / magento2-data-layer-frontend-ui
Storefront surface of the GA4 data layer: the Tag Manager and gtag.js loaders, the page bootstrap and its browser module (with the gtag.js destination), product list data, the endpoint that hands server-detected events to the browser, and the content security policy for Google's tag, analytics and a
Package info
github.com/hryvinskyi/magento2-data-layer-frontend-ui
Type:magento2-module
pkg:composer/hryvinskyi/magento2-data-layer-frontend-ui
Requires
- php: ~8.3.0||~8.4.0
- hryvinskyi/magento2-data-layer: ^1.0
- hryvinskyi/magento2-data-layer-api: ^1.0
- hryvinskyi/magento2-head-tag-manager: ^2.3.5
- magento/framework: *
- magento/module-catalog: *
- magento/module-catalog-widget: *
- magento/module-checkout: *
- magento/module-csp: *
- magento/module-customer: *
- magento/module-multishipping: *
- magento/module-sales: *
- magento/module-store: *
- magento/module-theme: *
- psr/log: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Storefront part of the GA4 data layer: Google Tag Manager and gtag.js loaders, page events, list and click tracking, the queue endpoints and Content Security Policy entries. Plain ES modules, no RequireJS, jQuery or Knockout.
Part of the GA4 Data Layer for Magento 2. The full user guide, covering setup, every setting and how to check what the store sends, is in docs/ga4-data-layer-guide.md of hryvinskyi/magento2-data-layer.
Installation
Install all GA4 Data Layer modules with the metapackage:
composer require hryvinskyi/magento2-data-layer-pack bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush
or this module alone:
composer require hryvinskyi/magento2-data-layer-frontend-ui
Requirements
- PHP ~8.3.0 or ~8.4.0
hryvinskyi/magento2-data-layer-apihryvinskyi/magento2-data-layerhryvinskyi/magento2-head-tag-manager- Magento 2.4.x