maksze / telemetry-bundle
Provides the ability to connect various telemetry systems such as google analytics, yandex metrika
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1.3
- symfony/config: ^3.0|^4.0|^5.0
- symfony/dependency-injection: ^3.0|^4.0|^5.0
- symfony/templating: ^3.4|^4.0|^5.0
Requires (Dev)
- symfony/phpunit-bridge: ^4.0
This package is auto-updated.
Last update: 2025-03-01 00:28:15 UTC
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() }}