modera/ backend-google-analytics-bundle
此包提供在后台使用Google Analytics收集'页面浏览'分析的支持。
v0.6.1
2022-01-17 12:30 UTC
Requires
- php: >=7.4
- modera/config-bundle: ^3.1|^4.0|^5.0
- modera/foundation-bundle: ^3.1|^4.0|^5.0
- modera/mjr-integration-bundle: ^3.1|^4.0|^5.0
- modera/security-bundle: ^3.1|^4.0|^5.0
- sergeil/expander-bundle: ^1.0
Requires (Dev)
- phake/phake: ^2.0
- phpunit/phpunit: ^5.5
- symfony/symfony: ^4.4|^5.0
README
此包提供在后台使用Google Analytics收集'页面浏览'分析的支持。
安装
通过运行以下命令将依赖项添加到您的composer.json中:
composer require modera/backend-google-analytics-bundle
如果您已安装modera/module-bundle
包,则无需手动更新您的AppKernel类,否则您需要将其添加到您的AppKernel中。
new \Modera\BackendGoogleAnalyticsBundle\ModeraBackendGoogleAnalyticsBundle(),
在启用包后,为确保已安装贡献的配置属性,请运行以下命令:
modera:config:install-config-entries
当此命令执行时,您将看到某些配置属性已安装,或者没有配置属性已安装。在后一种情况下,这意味着它们在包安装过程中由module-bundle自动为您安装。
文档
如果您想有一个UI来访问此包贡献的配置属性,那么您可能还需要安装modera/backend-google-analytics-config-bundle
包。
与应用程序相关的数据
您的内核类(app/AppKernel.php)可能还需要实现两个方法:getAppName和getAppVersion,然后它们将被\Modera\BackendGoogleAnalyticsBundle\Contributions\ConfigMergersProvider用于向GA发送更详细的数据。
许可
此包受MIT许可协议的保护。请参阅包中的完整许可协议:Resources/meta/LICENSE。