heyday/silverstripe-analytics
Composer 安装命令:
composer require heyday/silverstripe-analytics
包简介
Heyday's standard analytics module
README 文档
README
Heyday's standard analytics module to be used across all sites requiring analytics
Installation
composer require heyday/silverstripe-analytics
Setup
First, add details to SilverStripe configuration; for instance by creating an analytics.yml file with the following details:
Page: extensions: - Heyday\Analytics\AnalyticsExtension SilverStripe\Core\Injector\Injector: AnalyticsService: class: Heyday\Analytics\GoogleTagManagerProvider constructor: 0: 'GTM-XXXXX'
For Google Tag Manager AnalyticsID will be something like:
GTM-XXXXX
For Google Analytics AnalyticsID will be something like:
UA-XXXXXXXXX-X
Analytics for the site can now be included in a SilverStripe template simply with the following code in the relevant .ss file:
{$AnalyticsCode.RAW}
Google Tag Manager Code
Google Tag Manager code should be set as high in the <head> of the page as
possible:
<head> <title>Page Title</title> {$AnalyticsCode.RAW}
However, if you do have meta tags that set the charset or http-equiv attributes, you'll want them to be at the very top of head, since browsers expect them to be among the first characters of an HTML document.
Google Tag Manager no script tag is now separate from the Tag Manager container.
To use it in your template, just call the variable TagManagerNoScript
</head> <body> {$TagManagerNoScript} ...
Google Analytics Code
Google Analytics Code code should be set just after the <body> tag:
</head> <body> {$AnalyticsCode} ...
Using Google Search Console verification with Google Tag Manager
If you have a Google Tag Manager account, you can verify ownership of a site using your Google Tag Manager container snippet code.
To verify ownership using Google Tag Manager, choose Google Tag Manager in the verification details page for your site, and follow the instructions shown.
When copying Tag Manager code:
- You must have "View, Edit, and Manage" account level permissions in Google Tag Manager.
- Place the Tag Manager code immediately after the opening tag of your page. If you do not, verification will fail.
- You cannot insert a data layer (or anything other than HTML comments) between the tag and the tag manager code. If you do, verification will fail.
- Use the code exactly as provided; do no modify it. If you modify it, verification will fail.
For more information, check out this page: https://support.google.com/webmasters/answer/35179
heyday/silverstripe-analytics 适用场景与选型建议
heyday/silverstripe-analytics 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.79k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 09 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「analytics」 「silverstripe」 「Google Tag Manager」 「google analytic」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 heyday/silverstripe-analytics 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 heyday/silverstripe-analytics 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 heyday/silverstripe-analytics 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Analytics chooser extensions for site settings.
A Laravel Nova Card to show Fathom Analytics stats.
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
CitaNZ's SilverStripe picture object and field for SilverStripe 4
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 3.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-09-10