Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password?

Search the Forum

Tips and Tricks HQ Forum » WP Affiliate Platform » WP Affiliate F.A.Q/Instructions

Capturing Lead When used with a WordPress Contact Form Plugin

(1 post) (1 voice)
  • Started 1 year ago by amin007
  • Related Topics:
    1. Can WordPress Affiliate Platform be used to trace free download?
    2. Can I use the WP Affiliate Platform Plugin on a Standalone HTML page?
    3. Does the affiliate plugin work with Wordpress 3.3 ?
    4. Does eStore plugin support WordPress 3.3 ?
    5. eMember plugin work on Wordpress 3.2.1?

Tags:

  • Lead capturing
  1. amin007
    Key Master

    This instruction is suited best for someone with PHP Coding Knowledge

    The WP Affiliate Platform plugin allows you to use a "Pay Per Lead" affiliate model. It can be integrated easily with the popular Contact Form 7 Plugin. More details here:

    http://www.tipsandtricks-hq.com/wordpress-affiliate/how-to-use-pay-per-lead-affiliate-model-114

    If you need to integrate the lead capturing with a contact form plugin that you are customizing or developing then this is what you need to do to capture a lead.

    Simply paste the following piece of code after the form submission code of the contact form plugin:

    $aff_id = $_COOKIE['ap_id'];
    if(!empty($aff_id))
    {
        $reference = "12345";//Reference number or text associated with this lead
        $buyer_email = "buyerEmail@gmail.com";//Get this from's the contact form POST data
        $clientdate = (date ("Y-m-d"));
        $clienttime = (date ("H:i:s"));
        $ipaddress = $_SERVER['REMOTE_ADDR'];
    
        global $wpdb;
        $affiliates_leads_table_name = $wpdb->prefix . "affiliates_leads_tbl";
        $updatedb = "INSERT INTO $affiliates_leads_table_name (buyer_email,refid,reference,date,time,ipaddress) VALUES ('$buyer_email','$aff_id','$reference','$clientdate','$clienttime','$ipaddress')";
        $results = $wpdb->query($updatedb);
    }
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ Forum is proudly powered by bbPress

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin