modera/backend-google-analytics-bundle

此包提供在后台使用Google Analytics收集'页面浏览'分析的支持。

v0.6.1 2022-01-17 12:30 UTC

This package is auto-updated.

Last update: 2024-08-27 11:56:41 UTC


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)可能还需要实现两个方法:getAppNamegetAppVersion,然后它们将被\Modera\BackendGoogleAnalyticsBundle\Contributions\ConfigMergersProvider用于向GA发送更详细的数据。

许可

此包受MIT许可协议的保护。请参阅包中的完整许可协议:Resources/meta/LICENSE。