Home > Tracking Campaigns > FunnelFlux

FFlux Conversion Tracking: Email Autoresponder Integration (4)


10-18-2017 06:59 AM #1 weekendwarrior (Member)
FFlux Conversion Tracking: Email Autoresponder Integration

Currently optimizing our email campaigns based on conversions - i.e. different emails sent based on whether the visitor has converted for an offer or not.

For this, we need the conversion information in Getresponse (our email system), so that it knows not to send emails for an offer when it has already converted.

Is it possible to have FunnelFlux run a PHP script after specific conversions (e.g. Offer A converts) with the variables from the visitor (e.g. email we've added as a custom variable).

Or perhaps should this be achieved via accessing FunnelFlux API with a cron that would grab any new conversion information, and then parse it to Getresponse as appropriate?

Thanks for any ideas on how best/ most simply to handle this.


10-18-2017 08:59 AM #2 bbrock32 (Administrator)

Sent this to the FFlux support team, someone will reply with a detailed suggestion


10-18-2017 10:40 AM #3 vitavee ()

Is it possible to have FunnelFlux run a PHP script after specific conversions (e.g. Offer A converts) with the variables from the visitor (e.g. email we've added as a custom variable).

Or perhaps should this be achieved via accessing FunnelFlux API with a cron that would grab any new conversion information, and then parse it to Getresponse as appropriate?
Both are possible. The simplest solution would be to use our new plugin system (not public yet, but already there in 1.6+).

FF allows you to setup hook plugins that are triggered on specific events. You could setup a 'conversion hook' plugin, which would be immediately executed when a conversion occurs. Your plugin would receive the detailed information about the conversion that just occured, and you could call GetResponse's API from there.

Here's how to set it up.

1/ Create a file called conversionHook.php and put that one in your FunnelFlux root folder.

2/ Paste that code in your new conversionHook.php file:

Code:
<?php

require_once __DIR__ . '/plugins/ffHookPlugin.php';

class ConversionHook extends FFHookPlugin
{
    public function __construct()
    {
        parent::__construct( FFHookPlugin::TYPE_NEW_CONVERSION );
    }

    /**
     * 
     * @param ConversionInfo $conversionInfo
     */
    public function hookTriggered( $conversionInfo )
    {
        require_once __DIR__ . '/tracking/events/hitInfo.php';

        $hitInfo = HitInfo::getHit( $conversionInfo->getIdHit() );
        if( $hitInfo )
        {
            $idNode = (string)$hitInfo->getIdNode();
            $trackingFields = $hitInfo->getTrackingFields();
            
            if( $idNode == 'your-offer-node-id' )
            {
                $email = $trackingFields[ 'email' ];
                
                // Call GetResponse API to notify that this user has converted on this offer
            }
        }
    }
}

new ConversionHook();
Replace 'your-offer-node-id' with the id of the actual offer node in your funnel - so you call GetResponse's API only when that specific node converts.

And replace $email = $trackingFields[ 'email' ]; with the right tracking field name.

3/ This file needs to be included by the runtime - since we haven't released the plugin specifications yet, and don't have a standard way to register custom plugins, the safest way to do it for now (that won't be overriden when you will upgrade to a new version) is to include it in appConfig.php

So, open includes/appConfig.php and paste this at the very bottom:

Code:
require_once __DIR__ . '/../conversionHook.php';


10-18-2017 12:10 PM #4 weekendwarrior (Member)

Excellent - thanks for this detailed explanation VitaVee - can't wait to implement this.


Home > Tracking Campaigns > FunnelFlux