lukasbecker/kirby3-gtm
Composer 安装命令:
composer require lukasbecker/kirby3-gtm
包简介
Integrate Google Tag Manager into your kirby site
README 文档
README
Integrate Google Tag Manager tracking code into your kirby 3 site
Installation
Download
Download this repo, extract the files and copy them to /site/plugins/gtm.
Composer
composer require lukasbecker/kirby3-gtm
Usage
Default behaviour
To ensure that no data is collected during development this plugin is inactive as default.
You have to explicitely activate it via config option. We recommend to specify the activation in a domain specific configuration file, e.g. /site/config/config.yourdomain.com.php.
Configuration
There are only three config options:
- Activation
- Google Tag Manager ID
return [
'lukasbecker.kirby3-gtm.id' => 'GTM-XXXXXXX',
];
Panel fields
You can access two of them via panel.
This plugin provides two panel fields.
You can provide the plugin options via panel field in your site.yml:
fields:
gtmId: fields/gtmId
Use it in your templates/snippets
Embed the JavaScript and non-JavaScript code pieces via Kirby's snippet() helper function.
- Place the
gtm-script.php-file as close to the opening<head>tag as possible with<?php snippet('gtm-script') ?> - Place the
gtm-noscript.php-file immediately after the opening<body>tag with<?php snippet('gtm-noscript') ?>
Multi-environment setup
You can use this plugin in multi-environment setups. Place an individual Google Tag Manager ID per domain in the domain specific configuration file.
DNT
One concrete way we commit to user privacy is by honoring Do Not Track (“DNT”) browser settings.
lukasbecker/kirby3-gtm 适用场景与选型建议
lukasbecker/kirby3-gtm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 39 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lukasbecker/kirby3-gtm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lukasbecker/kirby3-gtm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-24