All beginners have one question to ask. How to make money with clickbank? But before that, you need to setup Clickbank Postback tracking. There are a lot of solid offers in Clickbank that are whitehat and can be promoted on various traffic sources without any issues.  The issue in many trackers are not compatible with clickbanks tracking and the conversions need to be exported then imported into your tracker to be able to track anything properly.  This obviously can be a HUGE pain and very time consuming when it comes to affiliate marketing tracking.

The first and best thing to do is get funnel flex as it fully integrates with Clickbank and you can control the funnel to optimize your traffic even further, but we will not focus on that. The point of this post is to get it working with any tracker like Voluum or Cpvlabs for example.

A lot of affiliates are not aware of this but you can call the postback in Clickbank anytime you have a sale! The main problem is the postback cannot be configured and sent to your tracking system the way you would like it to send.  It’s pretty much useless. That being said with one little script we can configure it and make it work with any tracking system out there!

You will need a few things before we get started.

  • Clickbank account
  • The postback URL from your tracker
  • The script (down below)
  • An SSL certificate (because clickbank will not send anything to a non secure URL)

Login to your clickbank account and click on my site in the top.

clickbanl login

Scroll down until you see integrated sales reporting

integrated sales reporting

Click “add tracking code” button.  In the type box select “Tracking Pixel Order Confirmation (Receipt).  For the track as select the affiliate option.

The URL you are going to enter is where ever you decide to upload the script below too. (example: The file needs to be in php format, remember this.

Everything should like the picture below.

tracking pixel affiliate

Click on “Save” and you will be direct to a page like the one shown below.

saved tracking code conversion

As you can see the tracking pixel is inactive.  We can activate this later once we have setup the script. Create a file called script.php and copy the following code into that file.

// 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 = ""
$postbackURL = "";
$cidParameterName = "cid";
$payoutParameterName = "payout";
$transactionParameterName = "txid";
$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);

Then you will have to edit a few things in the Settings to Edit.

First thing you will change is the $postbackURL. You will get the postback URL from your tracker (voluum, cpvlabs, etc) and paste it in it’s place between the quotes.  If your tracker is voluum then you are done and don’t need to do anything else.

If you are using another tracker you will need to change 3 more parts.

The line $cidParameterName = “cid”; Replace “cid” with the name of your postback click id parameter.  You will need to refer to your tracking guide documentation for this.

The line:

$payoutParameterName = “payout”;
Replace “payout” with the name of your postback payout parameter.  Again you may need to consult your documentation for your tracker.

The Line $transactionParameterName = “txid”; Replace “txid” with the name of your postback transaction id parameter -This helps you to track upsells if there are any. Please refer to your tracking documentation for more information.

Once this has been completed simply go back to clickbank and activate your tracking pixel and you are done!

tracking pixel

That is all that needs to be done, any questions please post them in our forum at

Comments (2)

Leave a comment

Your email address will not be published. Required fields are marked *