2017 © Pedro Peláez
 

symfony-bundle infinity-javascript-bundle

Infinitytracking InfinityJavascriptBundle

image

infinitytracking/infinity-javascript-bundle

Infinitytracking InfinityJavascriptBundle

  • Wednesday, March 19, 2014
  • by catchamonkey
  • Repository
  • 6 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Infinitytracking InfinityJavascriptBundle

Symfony2 Bundle to add Infinity Tracking Javascript code to your site. Support for page tracking, number replacement, custom triggers., (*1)

The configuration you define is made available to all twig templates through the use of an extension within the bundle., (*2)

Installation

Step 1) Download

The recommended method is via composer.
Add the bundle as a dependency to your composer.json file, (*3)

{
    "require": {
        "infinitytracking/infinitytracking-javascript-bundle": "1.0.*"
    }
}

Now tell composer to install this new requirement, (*4)

php composer.phar update

This will be installed into your vendor directory, (*5)

Step 2) Register the Bundle in your kernel

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Infinitytracking\Bundle\InfinityJavascriptBundle\InfinitytrackingInfinityJavascriptBundle(),
    );
}

Step 3) Configuration

Provide your Installation ID, along with Tracking Pool (dgrp) IDs and the classes you want to target in your pages., (*6)

Elements found with the class will have their contents replaced with the dynamically allocated phone number for this Tracking Pool, (*7)

#app/config/config.yml

infinitytracking_infinity_javascript:
    enabled: TRUE
    igrp: 19
    dgrps:
        sales:      { id: 1, classes: ['phone_number', 'number'], fallback: '08440001111' }
        service:    { id: 2, classes: ['service_phone_number'], fallback: '08440002222' }

Tracking

Page Tracking

Include the template in your base

{# app/Resources/views/base.html.twig #}

{% include 'InfinitytrackingInfinityJavascriptBundle:Default:base.html.twig' %}

...
{# Other JavaScript files from your head here #}
</head>

Number Replacement

Include the number template anywhere you want to render a number, setting the 'dgrp' name to that within your configuration., (*8)

This will output the fallback number, and add the tracking tags to ensure the dynamic number is replaced into it during tracking., (*9)

{% include 'InfinitytrackingInfinityJavascriptBundle:Default:number.html.twig' with {'dgrp':'sales'} %}

Custom Triggers

{% include 'InfinitytrackingInfinityJavascriptBundle:Default:customTrigger.html.twig' with  {
    'act' : 'SALE',
    'details' : "{
        'txc':'GBP',
        'txv':'10.00',
        'txr':'abcd1234',
        't':'Practical Caravan ~ 6 Month Subscription'
    }"
} %}

This will be rendered within script tags, to render without (if you are doing that yourself), then just render to the js template instead., (*10)

{% include 'InfinitytrackingInfinityJavascriptBundle:Default:customTrigger.js.twig' with  {
    'act' : 'SALE',
    'details' : "{
        'txc':'GBP',
        'txv':'10.00',
        'txr':'abcd1234',
        't':'Practical Caravan ~ 6 Month Subscription'
    }"
} %}

The Versions

19/03 2014

dev-master

9999999-dev http://github.com/Infinitytracking/InfinityJavascriptBundle

Infinitytracking InfinityJavascriptBundle

  Sources   Download

GPL-2.0

The Requires

 

analytics javascript tracking infinity

19/03 2014

v1.0.2

1.0.2.0 http://github.com/Infinitytracking/InfinityJavascriptBundle

Infinitytracking InfinityJavascriptBundle

  Sources   Download

GPL-2.0

The Requires

 

analytics javascript tracking infinity

19/03 2014

v1.0.1

1.0.1.0 http://github.com/Infinitytracking/InfinityJavascriptBundle

Infinitytracking InfinityJavascriptBundle

  Sources   Download

The Requires

 

analytics javascript tracking infinity

13/05 2013

v1.0.0

1.0.0.0 http://github.com/Infinitytracking/InfinityJavascriptBundle

Infinitytracking InfinityJavascriptBundle

  Sources   Download

The Requires

 

analytics javascript tracking infinity