maksze/telemetry-bundle
Composer 安装命令:
composer require maksze/telemetry-bundle
包简介
Provides the ability to connect various telemetry systems such as google analytics, yandex metrika
README 文档
README
Provides the ability to connect various telemetry systems such as google analytics, yandex metrika, ect
Motivation
You can simply connect the file with the metric code in prod mode. Roughly so:
{% if not debug %}
{% include 'telemetry.twig' %}
{% endif %}
but with bundle, it's much more fun)
Installation
Open a command console, enter your project directory and execute the following command to download the latest version of this bundle:
composer require maksze/telemetry-bundle
Configuration
To make this bundle work you need to add the following to your app/config/packages/maksze_telemetry.yaml:
# app/config/packages/maksze_telemetry.yaml maksze_telemetry: yandex_metrika: - {id: any_id} yandex_webmaster: - {id: any_id} google_search_console: - {id: any_id} google_analytics: - {id: any_id} facebook_pixel: - {id: any_id}
Add app/config/routes/maksze_telemetry.yaml
# app/config/routes/maksze_telemetry.yaml _maksze_telemetry: resource: '@MaksZeTelemetryBundle/Resources/config/routes.xml' prefix: /
Add to the main template before the closing body tag
{{ maksze_telemetry_render() }}
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-10