evheniy / gtm-bundle
GtmBundle 允许您将 Google Tag Manager 代码添加到您的应用程序中。
1.7.0
2015-12-02 11:50 UTC
Requires
- php: >=5.3.0
- symfony/symfony: >=2.3
Requires (Dev)
- satooshi/php-coveralls: dev-master
README
此包为 Symfony2 提供了 Google Tag Manager。
文档
您需要设置 GTM ID
gtm:
id: GTM-xxx
安装
$ composer require evheniy/gtm-bundle "1.*"
Or add to composer.json
"evheniy/gtm-bundle": "1.*"
AppKernel:
public function registerBundles()
{
$bundles = array(
...
new Evheniy\GtmBundle\GtmBundle(),
);
...
config.yml:
#GtmBundle
gtm:
id: GTM-xxx
{% include "GtmBundle:Gtm:gtm.html.twig" %}
许可证
此包采用 MIT 许可证。