timeinc / tealium-bundle
Tealium Implementation for Symfony
1.0.0
2016-03-22 10:46 UTC
Requires
- symfony/config: ~2.0|~3.0
- symfony/dependency-injection: ~2.0|~3.0
- symfony/http-kernel: ~2.0|~3.0
- timeinc/tealium: ~1.0
- twig/twig: ^1.24
Requires (Dev)
- leaphub/phpcs-symfony2-standard: ~2.0
- pdepend/pdepend: ~2.0
- phpmd/phpmd: ~2.2
- phpunit/phpunit: ~4.8
- sebastian/phpcpd: ~2.0
- squizlabs/php_codesniffer: ~2.3
This package is not auto-updated.
Last update: 2024-11-01 22:33:07 UTC
README
This bundle provides Tealium integration for Symfony2 and Symfony3 using
the timeinc/tealium
package.
Installation
Composer
composer require timeinc/tealium-bundle
Enable in AppKernel.php
$bundles = [ // ... new TimeInc\TealiumBundle\TimeIncTealiumBundle(), ];
Configuration
# app/config/config.yml time_inc_tealium: organisation: organisation-name # Required app: tealium-application # Required environment: prod udo: namespace: utag_data defaults: [] # Array of any variables to add as utag_data defaults
Usage
Controller
To use configure the UDO in the service, you can call the timeinc.tealium
service:
<?php class DemoController extends Controller { public function demoAction(){ $tealium = $this->get('timeinc.tealium'); $udo = $tealium->getUdo(); // use $udo->properties to add data to the UDO object $udo->properties['site'] = 'My Site'; } }
Twig
To render Tealium onto the page, use the tealium()
twig function:
<html> <head> </head> <body> {{ tealium() }} </body> </html>