exs/lander-tracking-cambuilder-bundle

This bundle adds a new Cambuilder's specific extracter and formatter for EXSLanderTrackingHouseBundle.

v1.1.4 2017-11-08 15:43 UTC

This package is auto-updated.

Last update: 2024-04-29 03:38:30 UTC


README

Build Status

What is this bundle doing ?

This bundle is not a standalone bundle and requires EXS-LanderTrackingHouseBundle.

It will add an extracter and a formatter to be added to EXS-LanderTrackingHouseBundle to manage CamBuilder tracking parameter.

The extracter service searches for parameters :

  • AFNO which contains a string composed of 1-{cmp}-{exid}

The formatter service will add the parameters if :

  • AFNO will contains a string composed of 1-{cmp}-{exid}

Installation

Download the bundle using composer

$ composer require exs/lander-tracking-awe-bundle

Enable the bundle, and the EXS-LanderTrackingHouseBundle that is installed as a requirement.

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new EXS\LanderTrackingHouseBundle\EXSLanderTrackingHouseBundle(),
        new EXS\LanderTrackingCambuilderBundle\EXSLanderTrackingCambuilderBundle(),
        // ...
    );
}

Configuration

The cmp parameter has a default value configurable with this configuration key :

# Default values.
exs_lander_tracking_cambuilder:
    default_cmp: 1

This default value will be used over EXS-LanderTrackingHouseBundle's cmp default value.

Usage

Example :

    <a href="{{ 'http://www.test.tld/' | appendTracking('cambuilder') }}">Some link</a>
    <!-- Will generate : "http://www.test.tld/?AFNO=1-123-987654321" -->
    
    <a href="{{ 'http://www.test.tld/?foo=bar' | appendTracking('cambuilder') }}">Some link</a>
    <!-- Will generate : "http://www.test.tld?foo=bar&AFNO=1-123-987654321" -->

See EXS-LanderTrackingHouseBundle's documentation for more information.