thelia/google-tag-manager-module
最新稳定版本:3.2.3
Composer 安装命令:
composer require thelia/google-tag-manager-module
包简介
README 文档
README
This module is made to use the Google Tag Manager / Google Analytics 4.
Installation
Composer
composer require thelia/google-tag-manager-module:~2.1.0
Usage
You need to configure the id from your Google tag manager account in the thelia administration panel.
It should look like GTM-XXXX.
This will generate both the head script and the body no-script tags and insert them in the main.head-top,
in the main.body-top, in the main.javascript-initialization and in the product.bottom hooks.
If these hooks are not present in your template, you'll need to add them beforehand.
To track products added to the cart, you need to implement this js event on the "Add to cart" buttons.
const event = new CustomEvent("addPseToCart", { detail: { pse: pseId, quantity }, }); document.dispatchEvent(event);
统计信息
- 总下载量: 3.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2016-03-03