sokil/promo-bundle

Promo

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

Type:symfony-bundle

0.1.2 2017-04-17 16:00 UTC

This package is auto-updated.

Last update: 2021-04-27 18:40:08 UTC


README

Latest Stable Version Total Downloads

Installation

Add composer dependency:

composer.phar require sokil/promo-bundle

Add bundle to your AppKernel:

<?php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Sokil\PromoBundle\PromoBundle(),
        );
    }
}

Configure routes in app/config/routing.yml:

# show landing page
landing_index:
  path: /
  defaults:
    _controller: PromoBundle:Landing:index
  methods:  [GET]

# track exit and redirect to external url
landing_away:
  path: /away
  defaults:
    _controller: PromoBundle:Landing:away
  methods:  [GET]

Away action

Away action used to redirect to some url from promo page.

First add configuration to bundle:

promo:
  away:
    allowed: true # allow redirect to external urls
    domainWhiteList: # if specified, allow redirect only to specified domains
      - http://example.com
    track: true # allow track of away campainn (default: false)

Tracking

Engine may be doctrine_orm or blackhole.

promo:
  tracking:
    engine: doctrine_orm # engine to store tracking data