Vita Vee
Active Member
There are quite a lot of affiliates promoting Clickbank offers and using trackers that are not fully integrated with CB's IPN. Usually it means that every so often they need to export the converted tids from CB and update the conversions manually in their tracker.
My 1st advice for these affiliates would of course be to switch to Funnel Flux, as it's fully integrated with Clickbank and working with all the other affiliate networks. Plus it's the best funnel builder and affiliate tracker anyway - but that's another story
But for the stubborn ones (haha) there's still a solution. Very few CB affiliates are aware of this (maybe no one???) but you can actually have Clickbank call your postback everytime a sale occurs!
There's a catch though - the postback parameters cannot be configured, so it's pretty much incompatible with all the trackers. But you can make it compatible with a tiny little script that I'm going to share with you.
You will need 4 things to get this working:
1/ A Clickbank account
2/ The postback URL from your tracker
3/ The script I'm sharing with you below
4/ An SSL certificate - Clickbank will not call your postback if it's not reachable via https (you can get an SSL certificate for free at startssl.com - so no excuse for this point)
So, go to your CB account and click on "My Site" in the top navigation:
Then scroll down until you reach the section titled "Integrated Sales Reporting"
Click the "Add Tracking Code" button.
In the "Type" combobox, select "Tracking Pixel: Order Confirmation (Receipt)"
Then for "Track Sale As", select the "Affiliate" option.
For the Tracking Pixel URL, enter the URL where you will upload the script that I'm sharing with you below. Let's say the URL you will use is https://yourdomain.com/vitavee-cb.php
For the tracking parameters, you can just click the box that says "Select All Parameters"
It should look like this:
Click save.
You will then be redirected to the previous page, and your settings will be displayed like this:
Note that your tracking pixel will be inactive. We will activate it later. We first need to edit a few things.
First create a file called vitavee-cb.php and paste the following code in that file:
Then you'll have to change a few settings in that file, in the section called "SETTINGS TO EDIT"
The first thing you need to change is the value of $postbackURL.
Take the postback URL from your tracker and paste it there, between quotes.
If your tracker is Voluum - then you're done on the editing part!
If you're using another tracker, you'll also have to change the 3 other parameters.
On the line:
$cidParameterName = "cid";
Replace "cid" with the name of your postback click id parameter (put it between quotes). Check the documentation of your tracker for this.
On the line:
$payoutParameterName = "payout";
Replace "payout" with the name of your postback commissions parameter - that way the commission amount for this transaction will be sent back to your tracker. If you don't want to send the commission amount, you can set this value to "". Check the documentation of your tracker to find the name of the commission amount parameter.
On the line:
$transactionParameterName = "txid";
Replace "txid" with the name of your postback transaction id parameter - that way you will be able to track upsells. Check the documentation of your tracker to find the name of the transaction id parameter. If none, enter the empty value ""
Then upload that file on your server, in a way that you can access it via the URL mentioned in Clickbank at a previous step. In our example it was https://yourdomain.com/vitavee-cb.php
Go back to Clickbank, and activate your tracking pixel:
That's all!
Now everytime a sale or an upsell occurs, your tracker's postback URL will instantly be called.
If you want to know more about Funnel Flux, check out our resource page here on AffiliateFix.
My 1st advice for these affiliates would of course be to switch to Funnel Flux, as it's fully integrated with Clickbank and working with all the other affiliate networks. Plus it's the best funnel builder and affiliate tracker anyway - but that's another story
But for the stubborn ones (haha) there's still a solution. Very few CB affiliates are aware of this (maybe no one???) but you can actually have Clickbank call your postback everytime a sale occurs!
There's a catch though - the postback parameters cannot be configured, so it's pretty much incompatible with all the trackers. But you can make it compatible with a tiny little script that I'm going to share with you.
You will need 4 things to get this working:
1/ A Clickbank account
2/ The postback URL from your tracker
3/ The script I'm sharing with you below
4/ An SSL certificate - Clickbank will not call your postback if it's not reachable via https (you can get an SSL certificate for free at startssl.com - so no excuse for this point)
So, go to your CB account and click on "My Site" in the top navigation:
Then scroll down until you reach the section titled "Integrated Sales Reporting"
Click the "Add Tracking Code" button.
In the "Type" combobox, select "Tracking Pixel: Order Confirmation (Receipt)"
Then for "Track Sale As", select the "Affiliate" option.
For the Tracking Pixel URL, enter the URL where you will upload the script that I'm sharing with you below. Let's say the URL you will use is https://yourdomain.com/vitavee-cb.php
For the tracking parameters, you can just click the box that says "Select All Parameters"
It should look like this:
Click save.
You will then be redirected to the previous page, and your settings will be displayed like this:
Note that your tracking pixel will be inactive. We will activate it later. We first need to edit a few things.
First create a file called vitavee-cb.php and paste the following code in that file:
Code:
<?php
// Script written by Vita Vee for affiliates who are
// NOT using the best funnel builder and tracker out there (ie Funnel Flux)
// and want a way to have Clickbank report conversions to their tracker.
// This script only reports initial sales and upsells.
// If you were using Funnel Flux instead, then rebills and refunds
// would also be tracked automatically as Funnel Flux is fully integrated with Clickbank.
//
// Instructions: You will edit the 4 parameters defined
// in the "SETTINGS TO EDIT" section below.
//
// 1/ Replace the value of $postbackURL by the postback URL given to you by
// your tracker BUT in that URL keep only the part that is before the ?
//
// 2/ Replace the value of $cidParameterName by the name of the click-id
// parameter (example: "cid" for Voluum)
//
// 3/ Replace the value of $payoutParameterName by the name of the parameter
// that allows you to track your commissions for a conversion (example: "payout" for Voluum)
//
// 4/ Replace the value of $transactionParameterName by the name of the parameter
// that allows you to track upsells (example: "txid" for Voluum)
//
// Only $postbackURL and $cidParameterName are mandatory.
// If you do not want or can't fill in the other two, then make them empty like this:
// $payoutParameterName = ""
// $transactionParameterName = ""
//-----------------------------------------------------
// SETTINGS TO EDIT
//-----------------------------------------------------
$postbackURL = "http://xxxxx.trackvoluum.com/postback?cid=REPLACE&payout=OPTIONAL&txid=OPTIONAL";
$cidParameterName = "cid";
$payoutParameterName = "payout";
$transactionParameterName = "txid";
//-----------------------------------------------------
//-----------------------------------------------------
// DO NOT TOUCH ANYTHING BELOW
//-----------------------------------------------------
$tid = filter_input(INPUT_GET, "trackingCodes");
$payout = filter_input(INPUT_GET, "affiliateCommission");
$txid = filter_input(INPUT_GET, "receipt");
$aParams = array();
if( $tid !== null && !empty($cidParameterName) )
$aParams[$cidParameterName] = $tid;
if( $payout !== null && !empty($payoutParameterName) )
$aParams[$payoutParameterName] = $payout;
if( $txid !== null && !empty($transactionParameterName) )
$aParams[$transactionParameterName] = $txid;
$aParts = explode("?", trim($postbackURL));
$finalPostbackURL = $aParts[0]."?".http_build_query($aParams);
if( $finalPostbackURL )
{
$ch = curl_init($finalPostbackURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
}
Then you'll have to change a few settings in that file, in the section called "SETTINGS TO EDIT"
The first thing you need to change is the value of $postbackURL.
Take the postback URL from your tracker and paste it there, between quotes.
If your tracker is Voluum - then you're done on the editing part!
If you're using another tracker, you'll also have to change the 3 other parameters.
On the line:
$cidParameterName = "cid";
Replace "cid" with the name of your postback click id parameter (put it between quotes). Check the documentation of your tracker for this.
On the line:
$payoutParameterName = "payout";
Replace "payout" with the name of your postback commissions parameter - that way the commission amount for this transaction will be sent back to your tracker. If you don't want to send the commission amount, you can set this value to "". Check the documentation of your tracker to find the name of the commission amount parameter.
On the line:
$transactionParameterName = "txid";
Replace "txid" with the name of your postback transaction id parameter - that way you will be able to track upsells. Check the documentation of your tracker to find the name of the transaction id parameter. If none, enter the empty value ""
Then upload that file on your server, in a way that you can access it via the URL mentioned in Clickbank at a previous step. In our example it was https://yourdomain.com/vitavee-cb.php
Go back to Clickbank, and activate your tracking pixel:
That's all!
Now everytime a sale or an upsell occurs, your tracker's postback URL will instantly be called.
If you want to know more about Funnel Flux, check out our resource page here on AffiliateFix.