Pay-per-Lead Affiliate Commission For New Subscribers

In this tutorial we want to introduce you to a very practical Klick-Tipp API.

Pay-per-lead commissions are a fantastic way to build a huge contact list in a short period. Offer your affiliates a commission for each new subscriber who signs up through their recommendation.

Of course, we are talking about new subscribers. You surely want to avoid

  • paying pay-per-lead commission for recipients whose email address have already been entered into your ContactCloud;
  • that your partner program software issues unwarranted affiliate commission payments when the same (new) user opens your Thank You page repeatedly

Our API can help you with that. Check your Thank You page to see if the email address of the person who just signed up is already in your contact system. If it is, then don’t display the tracking pixel that triggers the affiliate commission.

For this, you can use the following code example:


$email_address = $_GET['email'];
$found = isset($_COOKIE['affpixel']) || empty($email_address);

if (!$found) {

  // Cookie verfällt in 364 Tagen
  setcookie('affpixel', 1, time()+(60*60*24*364), '/');
  require_once ('');
  $connector = new KlicktippConnector(); 
  $connector->login('mein_benutzername', 'mein_passwort');
  $subscriber_id = $connector->subscriber_search($email_address);
  $subscriber = $connector->subscriber_get($subscriber_id);
  $subscription_timestamp = strtotime($subscriber->date);

  $time_difference = time() - $subscription_timestamp;

  if (($subscriber->status == 'Subscribed' && $time_difference > 120)
    || $subscriber->status == 'Unsubscribed') {
    $found = TRUE;



In order to use this example, replace “mein_benutzername” (my_username) in line 14 and “mein_passwort” (my_password) with you Klick-Tipp account’s login data. Then paste the source code at the beginning of your Thank You page, even before the <html> or rather your doctype declaration.

In order to have the tracking pixel of your partner program only display for new recipients, paste the source code farther down in the body (meaning between <body> and </body>) of your Thank You page:


if (!$found) {
  print "<img src='[url des tracking pixels]' width='1' height='1' />";


If you haven’t done so yet, enter the URL to the script as Thank You page into your double opt-in process settings. In order to do this, open the menu “Automatisierung” and choose the option “Double-Opt-in-Prozess”). Click on your process’ name in the table which should appear afterwards. Activate the option “Eigene Dankeschönseite verwenden” (“use custom Thank You page”) and enter the URL to the script into the form. Save the settings.

Next you should test your signup process. To do this, use an email address that is not connected to your account to sign up in your own signup form. When you inspect the source code of your Thank You page you should find the tracking pixel.

To ensure that the tracking pixel is not displayed again on your Thank You page when the same (new) subscriber opens your page anew (it should only be displayed once) we place a cookie with the name “affpixel” at the top of the script with the name. To test this you need to delete this cookie (or all cookies) from your browser.

Now sign up using and email address that’s already in your contact system. When you check the source code of your Thank You page now there shouldn’t be a tracking pixel.

With this simple script you ensure from the beginning that your affiliates are paid correctly. You will never again have to deal with unwarranted commission payments.