kowal / module-googletagmanager
将 GTM 添加到网页
1.1.10
2022-02-03 13:11 UTC
Requires
- kowal/base: *
README
``kowal/module-googletagmanager``
主要功能
将 GTM 添加到网页
安装
* = 在生产环境中请使用 --keep-generated
选项
类型 1: Zip 文件
- 解压 zip 文件到
app/code/Kowal
- 通过运行
php bin/magento module:enable Kowal_GoogleTagManager
启用模块 - 通过运行
php bin/magento setup:upgrade
应用数据库更新* - 通过运行
php bin/magento cache:flush
清理缓存
类型 2: Composer
- 将模块添加到 composer 仓库,例如
- 私有仓库
repo.magento.com
- 公开仓库
packagist.org
- 公开 GitHub 仓库作为 vcs
- 私有仓库
- 通过运行
composer config repositories.repo.magento.com composer https://repo.magento.com/
将 composer 仓库添加到配置中 - 通过运行
composer require kowal/module-googletagmanager
安装模块 composer - 通过运行
php bin/magento module:enable Kowal_GoogleTagManager
启用模块 - 通过运行
php bin/magento setup:upgrade
应用数据库更新* - 通过运行
php bin/magento cache:flush
清理缓存
配置
启用 (kowal_google_tag_manager/main/enable)
头部 (kowal_google_tag_manager/content/head)
主体 (kowal_google_tag_manager/content/body)
规格
块
- 头部 > head.phtml
块
- 主体 > body.phtml