- This topic has 0 replies, 1 voice, and was last updated 14 years, 2 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate F.A.Q/Instructions › Capturing Lead When used with a WordPress Contact Form Plugin
Tagged: delete all sales data, Lead capturing
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:
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);
}