• Iframe tracking and Big Bear attribution work together to offer the best attribution coverage possible so they both need to work in accordance with they’re specific documentation.
  • As affiliates are paid only for the sales they generate, make sure this attribution codes work as long as the affiliate program is active in 2Performant.

Here you can find specific information that can help you install 2Performant attribution codes if you have an online shop on PrestaShop.

The attribution codes are necessary to record the conversions coming from the traffic sent by the affiliates and represent an essential point in the operation of the affiliate program.

The attribution codes that must be implemented and maintained by an advertiser are of 2 types:

  • Big Bear attribution / full 1st party tracking
  • iframe tracking / 1st party – 3rd party tracking

Big Bear attribution

The attribution codes required for the Big Bear involve 2 different scripts:

  • script that must be installed in the footer of all pages
  • script to be installed on the thank you page / order confirmation page for fast and normal orders, for orders placed with or without an account and for all payment and shipping methods

In the case of Big Bear attribution, the script details are only available if you log in to your advertiser account and go to the Big Bear section:

From there, you can download personalized PDF documentation for installing Big Bear attribution on your site.

iframe tracking

Iframe tracking code must be placed on the thank you page / order confirmation page for fast and normal orders, for orders placed with or without an account and for all payment and shipping methods.

For script details you will need to log in to your account and go to the iframe section:

If you are using PrestaShop as an e-commerce platform, then you will need to edit two files: controllers/front/OrderConfirmationController.php and themes/theme/order-confirmation.tpl (OR themes/theme/templates/checkout/order-confirmation.tpl for Prestashop V1.7.X)

Replace the following placeholders with the program values:
CAMPAIGN_UNIQUE: you received it by e-mail
CONFIRM: you received it by e-mail

If you want to deduct VAT in the tracking code, you can add amount={$total_products/1.19} where 1.19 means that VAT is 19%. Bear in mind that VAT isn’t a stable percentage so this value can change.
In OrderConfirmationController.php, inside initContent() function, just before setting the template as ‘order-confirmation.tpl’, add:

$order = new Order($this->id_order); $cart = new Cart($order->id_cart); $description=""; foreach ($cart->getProducts() AS $k=>$v) { $description.=$v['name']."X".$v['quantity']; } $description=urlencode($description); $this->context->smarty->assign(array( 'total_to_pay'=>$order->getOrdersTotalPaid(), 'total_products'=>$order->total_products_wt, 'description'=>$description ));
In order-confirmation.tpl you will need to add the following code, modified with your own variables and values (if you want to substract the VAT from the order total):

<iframe height='1' width='1' scrolling='no' marginheight='0' marginwidth='0' frameborder='0' src='{$total_products}&campaign_unique=CAMPAIGN_UNIQUE&confirm=CONFIRM&description={$description}&transaction_id={Tools::getvalue('id_order')}&'></iframe>

For Prestashop V1.7.X, the above code should be added just before the last {/block}. Please make sure to clear the cache after saving the template (in Admin: Configure\Advanced parameters\Performance\Clear cache) .

The store currency must be configured in 2Performant platform, by going to Settings/General, Commission section, and setting the Currency.
Was this article helpful to you? Yes 1 No 2