fractas / googleanalytics
快速、可配置且简单的Google Analytics模块,支持多个GA ID
3.0
2019-02-01 11:46 UTC
Requires
This package is auto-updated.
Last update: 2024-09-06 13:36:43 UTC
README
概述
快速、可配置、简单Google Analytics和Google Tag Manager模块,支持多个GA ID
需求
- SilverStripe Framework 4
版本信息
此模块的主分支目前旨在实现SilverStripe 4.x兼容性
安装
-
通过Composer安装
composer require "fractas/googleanalytics" "^3.0"
-
在您的 mysite.yml 配置文件中添加Google Analytics ID,并启用额外功能(如有需要)
Fractas\GoogleAnalytics\GoogleAnalyticsController: enable_display_features: true # https://developers.google.com/analytics/devguides/collection/analyticsjs/display-features enable_in_dev: false ga_id: UA-xxxxxxxx-x0 #main Google Analytics ID property gtm_id: GTM-xxxxxxxx #Google Tag Manager ID ga_extra_ids: newTracker1: UA-xxxxxxxx-x1 #you can add multiple Google Analytics ID properties newTracker2: UA-xxxxxxxx-x2 newTrackerX: UA-xxxxxxxx-xX excluded_controllers: # Controllers that should be excluded from including GA codes. - Wilr\GoogleSitemaps\Control\GoogleSitemapController
-
在浏览器中运行flush=all
错误追踪
错误在 github.com 上追踪
许可证
- 查看 许可证