sintonia/airtime_mvc/application/controllers/plugins/ConversionTracking.php
Albert Santoni 3d03f837d2 Trial->Paid conversion tracking with GTM
* Added trial to paid conversion tracking with GTM
* Removed WHMCS roundtrip from Showbuilder
* Moved all Analytics code into common/GoogleAnalytics.php
* Added a new Thank You page after plan changes to capture conversions
* Added a ConversionTracking plugin to facilitate that
* Also backported some minor staticBaseDir compatibility changes
* Fixed a logic error in creating the baseDir
2015-03-24 10:11:25 -04:00

21 lines
No EOL
732 B
PHP

<?php
class Zend_Controller_Plugin_ConversionTracking extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
//If user is a super admin and old plan level is set to trial....
if (Application_Common_GoogleAnalytics::didPaidConversionOccur($request))
{
//Redirect to Thank you page, unless the request was already going there...
if ($request->getControllerName() != 'thank-you')
{
$request->setModuleName('default')
->setControllerName('thank-you')
->setActionName('index')
->setDispatched(true);
}
}
}
}