Conferences
New York, USA
28
July
St. Petersburg, Russia
29-30
July
New York, USA
04-05
August
26
August
Ivisa, Spain
31-02
August -
September
Budapest, Hungary
01-04
September
Budapest, Hungary
03
September
Budapest, Hungary
04-05
September
Limassol, Cyprus
11-12
September
Marbella, Spain
06
October
London, UK
22-23
October
Tashkent, Uzbekistan
13-14
November
Мехико, МексикаMexico City, Mexico
22
November
Italy
23-26
November
Colombo, Sri Lanka
30-02
November -
December
Bangkok, Thailand
03
December
Bangkok, Thailand
04-05
December

Facebook pixel auto-forward to ‘Thank You’ page


If you work with a large number of accounts at once (especially if you work via Dolphin), you can face the problem of placing each Facebook pixel code on the “Thank you” page. If you enter it manually, you will have to prepare separate flows for each account and spend a lot of time.

We need to configure everything so that the pixel is written on the “Thank you” page automatically. We used a bunch of Keitaro (using the CPARIP promo code) and KMA.biz affiliate, so let’s look at the example. Pre-landing and Landing are uploaded locally and the transfer of leads to the affiliate is done via API.

Forwarding a pixel via Keitaro

It all comes down to the fact that the pixel ID is passed via the incoming URL as a GET parameter.

We will get the pixel number by adding &fbp=pixel_number to the ad link.

  • In the tracker, we add the &fbp={fbp} offer parameter in the affiliate network settings. This is necessary for the forwarding from pre-landing to the landing page.

  •  Next, the pixel number received in the link will be forwarded through the order form, which is processed by the success.php file
  • To do this, add the following line to the order form <input type="hidden" name="fbp" value="{fbp}"/>

  • Keitaro will automatically substitute the pixel received in the link instead of {fbp} and then it will go to the handler. The only thing to do is to take it and add it to the thank you page.
  • In the api/success.php file add the line $_SESSION['fbp'] = $fbp; as in the screenshot:

  • Next, in the api/template/success.php file add the line $fbp = isset($_SESSION['fbp']) ? $_SESSION['fbp'] : '-';

  • In api/template/success.php we use the cut-down Facebook pixel <img height="1" width="1" src="https://www.facebook.com/tr?id=PIXEL_NUMBER&ev=Lead&noscript=1"/> We need to insert our received pixel number with the help of <?= $fbp ?>.

Done. Now each account will have its pixel number on the “Thank You” page.

Let’s consider a few more variants

The general principle is clear. Depending on the way of connecting landings on Keitaro and the peculiarities of realizing the transfer of leads in each affiliate, the methods of transfer will differ.

The same but without Keitaro

  • In the same way, we forward the pixel to the landing page in the ad link &fbp=pixel_number
  • To pull the pixel from the link to the very beginning of the landing index.php file add:
<?php

$fbp = (isset($_GET['fbp'])) ? trim($_GET['fbp']) : '';

?>
  • And add to the order form:
<input type="hidden" name="fbp" value="<?=$fbp?>" />
  • Further, as in the case with Keitaro, we pass the success.php to the “Thank you” page.

If the forwarding to the “Thank you” page is done via redirect

When the “Thank you” page is connected as a regular URL and the redirects go to it, the pixel should be passed as a parameter, and on the Thank you page we should pull it out of the URL and put it into the pixel code.

  • We need to add the received pixel to the redirect link:
https://domain/success.php?fbp=<?=$fbp?>
  • and get it again from the link on the thank you page:
<?php

$fbp = (isset($_GET['fbp'])) ? trim($_GET['fbp']) : '';

?>
  • and add it to the pixel code:
<img height="1" width="1" src="https://www.facebook.com/tr?id=<?=$fbp?>&ev=Lead&noscript=1"/

CPARIP


Like it? Share with your friends!
0 Comments
Affiliate - Our assessment
Verticals
Min. sum
Site
VAVADA review
It’s an affiliate program of the eponymous online casino. A direct advertiser as of 2017. They work by RevShare (up to 50%) partnership strategy.
1,000 rubles/$15/€15 pay
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
фото
It’s our affiliate program with gambling and betting offers. We are currently in beta but we accept traffic.
$20 pay
фото
783
Go to offers
V.Partners review
Direct advertiser of popular European casino and betting brands: Vulkan Vegas, ICE Casino, VERDE Casino, Vulkan Bet, and Hit'N'Spin. Established in 2016, they work on CPA, RevShare, and Hybrid models, accepting traffic from over 55 countries.
€100 pay
фото
фото
фото
фото
фото
фото