cabref
New Member
Prosper202 Real Time CPA Conversion Email Notification
Hi Dojo Members,
I´ve created a simple script to receive an email notification in real time each time we have a cpa conversion.
All cpa Networks has a "postback" config. When you make a sale/lead, the cpa network fire that postback and your prosper will send you an email with the conversion info.
Where will you receive that info?
The conversion notification will be sent to the email address configured in prosper202 settings.
so, here is the thing:
******
Postback Examples: (you should add those urls as your postback in the cpa network)
MAXBOUNTY:
Code:
http://urlprosper/tracking202/static/gpb.php?amount=#RATE#&subid=#S1#&offid=#OFFID#
CAKE:
Code:
http://urlprosper/tracking202/static/gpb.php?amount=#price#&subid=#s2#&offer=#oid#
PEERFLY:
Code:
http://urlprosper/tracking202/static/gpb.php?amount=%commission%&subid=%subid1%
Amount: How much you will earn with a conversion
Subid: unique Transaction ID
Offid: Offer ID (in your cpa network)
**********
Install:
**********
1.-
Copy file:
Code:
"lead-email.php"
Paste in your server:
Code:
prosper202/202-resources/lead-email.php
2.-
Edit o replace file:
Code:
prosper202/tracking202/static/gpb.php
(just replace with the new one just downloaded)
If you want to edit instead of replacing:
Open the file
Code:
prosper202/tracking202/static/gpb.php
add this line at the beginning:
Code:
include_once(substr(dirname( __FILE__ ), 0,-19) . '/202-resources/lead-email.php');
The result has to be similar to this:
Code:
header('P3P: CP="Prosper202 does not have a P3P policy"');
include_once(substr(dirname( __FILE__ ), 0,-19) . '/202-config/connect2.php');
include_once(substr(dirname( __FILE__ ), 0,-19) . '/202-config/class-snoopy.php');
include_once(substr(dirname( __FILE__ ), 0,-19) . '/202-config/class-dataengine-slim.php');
include_once(substr(dirname( __FILE__ ), 0,-19) . '/202-resources/lead-email.php');
At the bottom of the file add this code:
Code:
//Send Email When Lead
if(array_key_exists('offid',$_GET)) {
$offer = $_GET['offid'];
}
if(array_key_exists('camp',$_GET)) {
$campdesc = $_GET['camp'];
}
call_user_func('sendLeadMail',)
sendLeadMail($offer,$campdesc,$mysql['payout'],$mysql['click_id']);
Should look like this:
Code:
//set dirty hour
$de = new DataEngine();
$data=($de->setDirtyHour($mysql['click_id']));
//Send Email When Lead
if(array_key_exists('offid',$_GET)) {
$offer = $_GET['offid'];
}
if(array_key_exists('camp',$_GET)) {
$campdesc = $_GET['camp'];
}
call_user_func('sendLeadMail',)
sendLeadMail($offer,$campdesc,$mysql['payout'],$mysql['click_id']);
}
**********
That's all!
Remember: if you update prosper202 changes will be lost. So you will need to make the whole process again.
Download:
Code:
https://www.dropbox.com/s/fnho5y05ap7ly2l/202-cpa-lead-notification.rar?dl=0
Note for AF Staff: If you want this script could be added to AffKit Tools!
Note2: Sorry about my english!
Enjoy
**********
Last edited: