[SHARE] Set up postbacks for conversion tracking. No Tracking = No Money!

JohnsonDaniel

Regular Member
May 16, 2008
389
1,398
As the title says, if you don't track, you will lose money, it's a well-known fact by everyone who IS making money.

This thread may not be in the correct section - MODS, PLEASE MOVE IF SHOULD BE SOMEWHERE ELSE

Some history...
I have found CLP users asking how they would send a postback from a Thank You page if they wanted the visitors to their lockers to complete an email opt-in form, or an offer THEY have created, as opposed to a Network's CPA offer. There appears to be little discussion providing answers regarding how to do this, and I KNOW it's something most IMers would want to know how to deal with, whether content locking or not.

Conversion tracking has multiple uses, you may want to send your postback to a tracking script (think Prosper202, CPVLab, etc), to a self-hosted locker script so it unlocks, to a JV partner's tracking script, or to any script which awaits a postback confirmation in order to then take an action.

So, for the first time (afaik), here is a share of exactly how to achieve it. This is a basic cookie to S2S (server to server) Postback url.

There are a few files you need to set up correctly and a few details you will need, here is the list:

THINGS YOU NEED
============


A) Traffic Page - Any page which is locked, and where the locker has a link to your offer/email opt-in/whatever. Also, if not locking, can be any page displaying a link to your offer.
THIS PAGE CAN BE ON ANY DOMAIN. THE LOCKER CAN ALSO BE ON ANY DOMAIN.

B) Landing Page - offer.php This will be your landing page, i.e. the page on which you display your offer, or your email opt-in code, or wherever your visitor will land, and then convert.
THIS PAGE CAN BE ON ANY DOMAIN, DOES NOT NEED TO BE RELATED TO "A" AT ALL.

C) Thank You Page - thks.php This will be your Thank You page, i.e. the page visitor's get sent to IF they have completed whatever action your offer requires, or IF they have submitted your email opt-in form. THIS PAGE CAN (but does not need to) BE ON THE SAME DOMAIN AS "B".

D) Tracker/Conversion Script - conversion.php This is the tracker file, where the "magic" happens. THIS PAGE SHOULD BE ON THE SAME DOMAIN AS "B".

E) Your postback url (for the purposes of the code, I will be using http://trackDomain.com/postback.php?sid=)

F) A subid generator, if not using content locking. i.e. each individual you send to the offer link must have a subid, or you won't be able to track whether or not they have converted. If this is needed, I can post it. If using self-hosted lockers, they generally automatically create unique subids for your visitors.

CODE TO USE
=========


1. Create a Landing Page, and name it offer.php (ALL NAMES ARE OPTIONAL, IF YOU CHANGE THEM, JUST CHANGE IN THESE INSTRUCTIONS AND/OR IF THEY APPEAR IN ANY CODE). Upload it to OfferDomain.com (i.e. the domain which you want to place your offer on).

Sample code:
Code:
[FONT=monospace]<html>[/FONT]
<head>
<?php
//Get the subid we send with the visitor, in USAGE Step Two below, and set a cookie.
setcookie("tid", $_GET['sid'], time()+7*24*60*60, '/', '.OfferDomain.com');
?>
</head>
<body>
<!-- Offer whatever you want, ask your users to do whatever you want, and, if they DO it, send them to Thank You page -->
<a href="http://OfferDomain.com/thks.php">CLICK HERE</a></body>
[FONT=monospace]</html>[/FONT]

2. Create your Thank You page, name it thks.php and upload it to OfferDomain.com:

Code:
<html><head>
</head>


<body>
<!-- Insert whatever you want to thank your user for having completed your offer or action -->
THANK YOU
<!-- Insert invisible image code to ping your conversion script, indicating that THIS visitor reached the Thank You page -->
<img src="http://OfferDomain.com/conversion.php" height="1px" width="1px" />
</body>
</html>

3. Create your Conversion script, name it conversion.php, and upload it to OfferDomain.com:

Code:
<?php
if (isset($_COOKIE['tid'])) {
//Replace the postback url from E above with YOUR postback url
$url = 'http://trackDomain.com/postback.php?sid='.$_COOKIE['tid'];
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);
curl_close($ch);
}
?>


USAGE
=====


Step One:

Create your landing page on any domain you want, populate it with your offer, make sure that when your offer/email opt-in/whatever is completed, the user will be redirected to your "Thank You" page. In the example above, the landing page is http://OfferDomain.com/offer.php. The landing page does NOT need to end in php, it can end in html, or htm, if you wish, but php is better.

Step Two:

On your traffic page (where you send your traffic), add a link to your landing page, and make sure you add a unique subid. The link will look like this:

http://OfferDomain.com/offer.php?sid=UniqueString

If your traffic page is "locked" with a self-hosted locker, the offer url to add to your locker (in ContentLockPro V2, but others are similar) is:

http://OfferDomain.com/offer.php?sid=[[subid]]

If your traffic page is NOT locked, and you need help generating unique strings to use as subid's, post below and I'll put the code up.

Step Three:

Send traffic to your Traffic page!


SUMMARY OF PROCESS

User's who decide to visit your offer, or your landing page with email opt-in, will be sent to offer.php with a unique string.
On offer.php, the unique string will be collected, and a cookie will be set on the user's computer.
On offer.php, if the user completes the offer or required action, they will be redirected to your Thank you page (thks.php). You can have Aweber or other scripts redirect your users to your thank you page.
On your Thank You page (thks.php) a call will be made to your conversion script (conversion.php).
On your conversion script (conversion.php), your user's browser will be checked for the existence of your cookie and, if it's present, will collect the unique subid within the cookie, and make a ping to your postback script, appending the subid, thus completing the tracking process.

Hope this helps clarify these terms for people, and helps set up postbacks and whatever else you need to adequately track what you're doing and make money!

IMPORTANT
========


Please, I only ask a few things in return:

a) If you appreciate this thread, do NOT post thanking me for it - there is a Thanks button on this forum, use that instead of cluttering up the thread.
b) Post any questions you have, but please provide evidence that you have READ the OP first!
c) No PMs, please...I'll answer all relevant questions (which comply with b above) in the thread.
d) If you suddenly feel the need to share this elsewhere then please show some respect by attributing the original source (JohnsonDaniel, on this forum) and share it freely (God...it PI**ES me off to see rehashed, repackaged, stuff that was free getting sold!!!)
 
I tried to do this but the cookie does not set. i did use domain.com/test/offer.php?sid=[[sid]] instead of domain.com/offer.php?sid=[[sid]]

And do I need to create a domain.com/test/postback.php ?

-dr3y
 
I would to see a subid generator code.. it could be very useful! :)

Will get that posted later this evening.

I tried to do this but the cookie does not set. i did use domain.com/test/offer.php?sid=[[sid]] instead of domain.com/offer.php?sid=[[sid]]

And do I need to create a domain.com/test/postback.php ?

-dr3y

Hmm, I need to know more steps than that...here's what should be happening:

a) You are using a locker, CLP in particular. If this is so, then when you use that link as your Offer Url (domain.com/test/offer.php?sid=[[sid]]) and then visit the site you have "locked" with the locker that contains that link, and then click on the link, CLP will generate a unique subid for you, and replace the [[subid]] token with the unique string.

b) If you are NOT using a CLP locker, then you shouldn't be using the subid token for CLP, you should be using an ACTUAL subid, or keyword token (for prosper202) or some other uniquely generated string.

c) If using CLP, then you will get the postback url you need to use from your Dashboard, under "Embed Code". If you are not, then you need to create your own postback script, unless you are doing postbacks to an existing script which comes with some other locker, or tracking software (Prosper/CPVLab or others).

So, you first need to know what you are trying to achieve (tracking? unlocking? rewarding?), and then use the script above to help you do it. If you're stuck, feel free to post your questions.
 
Thanks Daniel,

I'm using CLP.

I'm using this to lock a content using my own offers.

1. So user goes to domain1.com and is presented with CLP2 locker.
2. He/she clicks on the custom offer and opens a new page for the offer page at domain2.com. Upon "completing" the offer, I can't seem to find any cookie being set. I used chrome and firefox. Copied your code and replaced all domains with my existing and working domain.
3. Yes it does jump from offer.php --> thks.ph ---> conversion.php --> pings to postback but nothing happens to the locker. :)

Does the script work on your end Daniel? I maybe having troubles with my hosting (curl issue perhaps?) because I'm using fatcow..

Cheers!

Dr3y
 
Hey,

Yep, was tested my end.

The cookie gets set when they land on domain2.com/offer.php

When they then land on thks.php, the inclusion of the conversion.php file (which also needs to be on domain2.com) is what checks whether or not the cookie is present, and, if it is, what the subid is. Then it pings the CLP postback url with that subid, and the locker, from the initial locked page, gets removed.

In the conversion.php script I posted, please double check you replaced this:

Code:
[FONT=monospace]http://trackDomain.com/postback.php?sid=

with your ACTUAL postback url, taken from your CLP Embed Code page for the locker with the custom offer.[/FONT]
 
Hi,

Yup I'm seeing the cookie is being now set but the page does not unlock.. let me see why this is happening..
 
I think there is something wrong with my locker installation.. I got a conversion lately from a cpa offer and CLP2 does not show that I got a conversion.. What seems to be missing with my installation?
 
Maybe try it with mysql? After subid from postback received, creates/updates a column with user name with value subid.

THEN, on the page the user is, keep checking if the column with his username was created and when it is, the locker disappears/redirects.

Will post the code in short.
 
Thanks Bud!

Hope to see that code.. Badly need it.. Perhaps it may be the reason why my youtube vid is having more dislikes than likes and people says I'm fraud..lol

I hope I can get this fixed asap. I just got a conversion from incent.ly but CLP2 does not report that a conversion has been made. I also assume that since it does not report that there is a conversion, it does not unlock the page as well...

Hope to get the code hack.. :)
 
Thanks Bud!

Hope to see that code.. Badly need it.. Perhaps it may be the reason why my youtube vid is having more dislikes than likes and people says I'm fraud..lol

I hope I can get this fixed asap. I just got a conversion from incent.ly but CLP2 does not report that a conversion has been made. I also assume that since it does not report that there is a conversion, it does not unlock the page as well...

Hope to get the code hack.. :)

Actually your best bet would be to send in a CLP support ticket, as it's why the support section is there. It's 100% private, so you can send in sample urls, and Daniel (my alter ego) will work with you until it works 100%.

Don't really want this turning into a CLP support thread, as its main purpose was for conversion tracking, which is a completely separate subject to content locking. Although locking uses postbacks to unlock, it's not the only thing postbacks are used for, and this tutorial and code has plenty of other uses, even for BHW members who aren't locking content at all.
 
Thanks Bud!

Hope to see that code.. Badly need it.. Perhaps it may be the reason why my youtube vid is having more dislikes than likes and people says I'm fraud..lol

I hope I can get this fixed asap. I just got a conversion from incent.ly but CLP2 does not report that a conversion has been made. I also assume that since it does not report that there is a conversion, it does not unlock the page as well...

Hope to get the code hack.. :)

Here are two examples of what I do:

http://www.*******.com/postback-example.php [change 1 for L]
http://prosper.tracking202.com/scripts/auto-postback/

Those are the most basic postback scripts out there, only customize and you are ready to go!

[I could help you customizing them, just send me a pm]
 
Thanks, but Pasenseoso doesn't need this at all, as they are using CLP, and CLP has its own postback functionality, which is exactly what they are trying to postback to. CLP generates the postback url they need to use and, when a postback call is received (ON THAT URL), then the locker the visitor is seeing (which was generated by CLP) will get removed.

In any case, for people needing postback scripts and NOT using scripts which altready include the functionality, the links you posted might be of some help.

Here are two examples of what I do:

http://www.cpa1ead.com/postback-example.php [change 1 for L]
http://prosper.tracking202.com/scripts/auto-postback/

Those are the most basic postback scripts out there, only customize and you are ready to go!

[I could help you customizing them, just send me a pm]
 
I would to see a subid generator code.. it could be very useful! :)

Given that you are a CLP user, you can find the subid script in the CLP User's forum.

If other BHW members, who are NOT CLP users, have a need for this, just post and I'll make another thread for it, it's quite a simple script, but helps to mingle traffic you use subid's for, with traffic you normally wouldn't use them for, so ALL your traffic looks to be from a similar source ;)
 
Gently bumping this...am surprised it doesn't seem to be of any use to people, given the importance of tracking in general.
Just so you all know...this does NOT require you to be involved in content locking for it to be useful in your IM business...tracking is golden in any line of IM :)
 
I got this working and sorry for not having been able to update this! Very useful for forcing to create an email list. :)
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock