How to Track ‘Lead Source’ with SugarCRM Lead Forms

Creating a Hidden ‘Lead Source’ in SugarCRM Web-To-Lead Forms & Building a Report off of Lead Source

lead source with SugarCRM lead formSugarCRM has several powerful inbound marketing capabilities, but it’s a matter of knowing how to use them. One such capability is the ability to track a ‘lead source’ in the SugarCRM web-to-lead form. The idea is that when you link to a landing page, you have a hidden ‘lead source’ field embedded in your form to track where the lead came from. You can then build a report off of this field to see which sources are generating the most leads. This article will cover adding a hidden ‘lead source’ field to a SugarCRM web-to-lead form, and then reporting off of this field.

First, create a new field in your “Leads” module for your lead source, and then add that field to your layout. Make sure the data type of this field is a ‘TextField,’ and make sure it is set to “Reportable.” Your options for creating your field should look something like this:

How to track lead source with SugarCRM lead forms
 

 

 

 

 

 

 

 

 

 

 

 

Now that your ‘lead source’ field is created, you’re going to want to put a hidden field for this into your contact form. For instructions on creating a web-to-lead form with SugarCRM, read this blog article. When you’re creating your contact form, you should have in mind where your landing page will be hosted and how visitors are going to get to it – this should be used to determine what will populate the ‘lead source’ field. To drop this hidden field into your contact form, you will use this code:

<tr>
<td style="display: none;"><input id="lead_source_description_c" name="lead_source_description_c" type="hidden" value="Name of Lead Source" /></td>
</tr>

 

The areas in this code that reference “input id=” and “name=” should contain the name of the custom filed you created earlier. It’s important to put your field name in here and not the display label. Where the code references “value=” is where you are going to enter the name of your lead source. This is the name that will populate your field when a form is filled out, and the name that your report will be built off of.  If you’re using the same lead source for multiple forms, it’s important to make sure the spelling and capitalization is written out exactly the same across all forms. Otherwise a separate lead source will be generated in your report.

When placing this hidden field into your contact form, you should place it down towards the bottom with your other hidden fields. When added, the form should look something like this:

<tr align="center">
<td style="text-align: left;" colspan="10"><input onclick="submit_form();" type="button" name="Submit" value="Get White Paper!" /></td>
</tr>
<tr>
<td style="display: none;"><input id="campaign_id" type="hidden" name="campaign_id" value="2a4216e3-174e-5584-3b3a-51f278948a59" /></td>
</tr>
<tr>
<td style="display: none;"><input id="assigned_user_id" type="hidden" name="assigned_user_id" value="c038d90c-8e9c-e162-0485-50aa61ec61f2" /></td>
</tr>
<tr>
<td style="display: none;"><input id="team_id" type="hidden" name="team_id" value="1" /></td>
</tr>
<tr>
<td style="display: none;"><input id="lead_source_description_c" name="lead_source_description_c" type="hidden" value="Name of Lead Source" /></td>
</tr>
<tr>
<td style="display: none;"><input id="team_set_id" type="hidden" name="team_set_id" value="Global" /></td>
</tr>
<tr>
<td style="display: none;"><input id="req_id" type="hidden" name="req_id" value="first_name;last_name;email1;account_name;" /></td>
</tr>
</tbody>
</table>
</form>

Your hidden ‘lead source’ field is now added to your contact form, and you are ready to report off of where your leads are coming from. Create a new report with a report type of “Summation Report with Details,” and base it off of your “Leads” module. When defining your filter, pick the new field that you created, and set it to “Is Not Empty” – it will look something like this:

SugarCRM Lead Source Tracking

 

Add the name of your field to “Define Group By”:

Lead Source Web-to-Lead Form

 

Under the “Choose Display Summaries” again choose the name of your field, and also select “Count”:

Web-to-Lead Lead Source in SugarCRM

 

Now pick your display columns, remember to include your new field, and pick any fields you feel relevant to pull data from:

Lead Source in SugarCRM

 

For chart options, select a “Horizontal Bar,” and enter all other important information. Now just name your new report, and you’re good to go! Once data starts to get entered from prospects filling out your lead forms, your new report will show which sources are referring you the most leads, and it will also give you a breakout of which leads are coming from which sources. You can customize this report any way you want to pull information that you feel is important to your marketing strategy.

For any questions about creating lead forms with Sugar, or help with services and consulting, call us at 440.352.4700 or you can email me directly at jbailey@e2btek.com.

SugarCRM Free Trial

Related Posts