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
This commit is contained in:
parent
7b9efb988f
commit
3d03f837d2
11 changed files with 222 additions and 102 deletions
|
@ -0,0 +1,21 @@
|
|||
<?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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue