“mobile”/ adcombo
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Prosper202 Real Time CPA Conversion Email Notification

Discussion in 'Guides, Case Studies and Tutorials' started by cabref, May 10, 2016.

  1. cabref

    cabref Affiliate affiliate

    10
    6
    3
    prosper.png
    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
    01.png
    2.-

    Edit o replace file:

    Code:
    prosper202/tracking202/static/gpb.php
    (just replace with the new one just downloaded)

    02.png

    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: May 11, 2016
  2. ytz
  3. K

    K Administrator Administrator affiliate

    This is awesome, thank you.
     
  4. crysper

    crysper Moderator moderator Service Manager affiliate

    Nice script. It's not something that we'll add to AffKit since it's depended on the tracker, but it's good to have it here as a guide for the guys who are interested in getting notified about the leads.
     
  5. cabref

    cabref Affiliate affiliate

    10
    6
    3
    That's perfect! I'm glad to share. Thank you both for your comments.
     

Top Resources

banners