How do I customize my lead sources?

In this tutorial you’ll learn how to take a normal webform with a hardcoded lead source and make it recognize lead source dynamically while also storing the Referring URL.

Step 1

Add a custom field called ReferringURL. Add another one called LeadSourceName.

Check out the User Guide for help: http://ug.infusionsoft.com/article/AA-00224/0/Create-custom-fields.html

Step 2

Add those custom fields as hidden fields on the form in Campaign Builder. Also add LeadSourceID.

Leave the fields blank.

Check out the User Guide for help on adding a hidden field:
http://ug.infusionsoft.com/article/AA-01090/0/Campaign-web-form-feature-list.html#hidden%20field

Step 3

Add a second hidden field called Lead Source ID. Leave it blank.

Step 4

Get the HTML version of your form from the Code tab.

Step 5

Add this code verbatim above that HTML:

<?php
$ref = $_SERVER[‘HTTP_REFERER’];
?>

Step 6

Then replace this
<input name=”inf_custom_ReferringURL” type=”hidden” value=”null” />

with this
<input name=”inf_custom_ReferringURL” type=”hidden” value=”<?php echo “$ref”; ?>” />

Step 7

Then replace this
<input name=”inf_custom_LeadSourceName” type=”hidden” value=”null” />

with this
<input name=”inf_custom_LeadSourceName” type=”hidden” value=”<?=$_REQUEST[‘inf_field_LeadSourceName’]?>” />

Step 8

Then replace this
<input name=”inf_field_LeadSourceId” type=”hidden” value=”null” />

with this
<input name=”inf_field_LeadSourceId” type=”hidden” value=”<?=$_REQUEST[‘inf_field_LeadSourceId’]?>” />

Step 9

Save this form, with the extra PHP code above the HTML, to your page. Save the page as .PHP.

Step 10

Format any links leading to this page like this

http://example.com/urltest.php?inf_field_LeadSourceId=1234&inf_field_LeadSourceName=NAMEOFLEADSOURCE

Where 1234 is the lead source ID and NAMEOFLEADSOURCE is the specific name of the lead source.

Step 11

Now you can search for activity and revenue on Lead Source ID, Referring URL, and your chosen name for each lead source.

 

——
Thanks Christian Wiles, Paul Sokol, and Tyler Garns for help with getting the PHP down right.

>