PHP code example of berno / pff2-fb-conversion-api

1. Go to this page and download the library: Download berno/pff2-fb-conversion-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

berno / pff2-fb-conversion-api example snippets

 
public function pageViewTrigger() {
    $this->resetViews();
    /** @var Pff2FbConversionApi $fb_conv_api */
    $fb_conv_api = ModuleManager::loadModule('pff2-fb-conversion-api');
    $fb_conv_api->sendPageViewEvent();
}

 $this->renderAction('Layout', 'pageViewTrigger', array())

sendCompleteRegistrationEvent($event_source_url, $user_email, $status)

sendInitiateCheckoutEvent($event_source_url, $user_email, $value, $currency = "EUR")

sendViewContentEvent($event_source_url, $user_email, $content_name, $content_ids, $value, $currency = "EUR")

sendAddToCartEvent($event_source_url, $user_email, $contents, $value, $currency = "EUR")

sendPurchaseEvent($event_source_url, $user_email, $content_ids, $order_value, $currency = "EUR")