Skip to content

Track Lead Source in Sugar CRM

If you cannot tell which channel produced a given Sugar CRM lead, you cannot answer basic questions such as how many leads came from Google Ads or how many customers came from Facebook Ads. This guide walks through the four-step setup, the exact data that reaches Sugar CRM, and the reports that make the data useful.

Four steps to source-tagged leads

The workflow has four parts, in order: install the tracking script and add hidden fields to your forms; let the script write source data into those fields; submit the form so the data travels into Sugar CRM; then build reports on the stored values. Each step depends on the previous one, so a missing hidden field breaks the chain even if the script is installed correctly.

Step 1: Install the script and add hidden fields

After signup you receive a snippet to place on your website. The placement method depends on your site builder — WordPress, Wix, Webflow and others each differ — and you can also load it through Google Tag Manager. Full step-by-step placement instructions are available in the help center.

On the form side, add these hidden fields:

  • Channel
  • Channel Drilldown 1
  • Channel Drilldown 2
  • Channel Drilldown 3
  • Channel Drilldown 4

The way you add hidden fields varies by form tool (Gravity Forms, Typeform, Wix Forms and others), and per-builder instructions exist for most form builders. The field names must match exactly, because the script looks for those names when writing values.

Step 2: The script fills the hidden fields

After installation, the script watches how each visitor reaches your site and sorts them into channel categories that mirror the ones analytics tools use — Organic Search, Paid Search, Paid Social and similar. That category is saved in a cookie in the visitor's browser, so the original source is retained through later page views and even a return visit days afterward. On form submission, the saved values are placed into the hidden fields you created in step 1.

Step 3: The data reaches Sugar CRM

When the form is submitted, your form tool picks up the values in the hidden fields and forwards them to Sugar CRM. The script is compatible with most form builders, including Gravity Forms, Jotform, Wix Forms, Webflow Forms and Squarespace Forms.

Step 4: Report on where leads and customers come from

Once source values live in Sugar CRM, Sugar's built-in reporting tools can answer questions such as how many leads came from Google Ads or how many customers came from Facebook Ads. Example dashboards for marketing, Google Ads and SEO show the kinds of views that are possible.

What data reaches Sugar CRM

Two categories of data are passed with each new lead: marketing channel data and landing page data. The examples below show how the values look in practice.

Marketing channel data

Channel data records how the lead arrived. If a lead clicked a Google Ads ad for Sugar CRM, the values depend on the UTM parameters behind the ad and would look like this:

  • Channel: Paid Search
  • Channel Drilldown 1: Google
  • Channel Drilldown 2: the campaign name, e.g. Brand Campaign
  • Channel Drilldown 3: the keyword used, e.g. Sugar CRM

If the same lead arrived organically through a Google search, the values would be:

  • Channel: Organic Search
  • Channel Drilldown 1: Google
  • Channel Drilldown 2: the Google domain, e.g. www.google.com
  • Channel Drilldown 3: the keyword used, if available

Landing page data

Alongside channel information, the script records the first page a lead landed on (for example sugarcrm.com/blog/best-crm) and the broader page group it belongs to (for example /blog). Stored in Sugar CRM, these values let you count leads and customers by site section, then narrow down to individual pages within that section.

Field-to-report map

The table below pairs each hidden field with the reporting question it answers. Use it as a checklist when configuring forms, so no field is missed.

Three example reports

These reports illustrate how the stored data becomes useful. They are examples of report shapes, not fixed templates.

Leads by channel. A monthly tally of leads, split by channel (Paid Search, Paid Social, Organic Search and so on). It offers a high-level picture of which channels bring in leads and how each is trending, which helps decide where to invest further.

Opportunities by Google Ads campaign. A monthly tally of Opportunities, split by campaign. It reveals which campaigns generate leads that turn into sales opportunities, and therefore which campaigns merit more budget and which should be paused.

Customers by Facebook Ads network. A monthly tally of new customers from Facebook Ads, split by network (Facebook itself, Instagram, Messenger, WhatsApp). It shows where ads perform best and which networks to double down on.

Wrap-up

If you need to know where leads and customers come from, storing source values directly in Sugar CRM is a practical route. The resulting data supports channel, campaign and landing-page reporting without leaving the CRM. Before committing to any tool, check its current trial terms and setup requirements directly, and confirm how long implementation typically takes for a site like yours.

Hidden field to reporting question
Hidden fieldWhat it recordsReporting question it answers
ChannelTop-level channel, e.g. Paid Search, Organic SearchWhich channels produce leads?
Channel Drilldown 1Source within the channel, e.g. GoogleWhich source within a channel produces leads?
Channel Drilldown 2Campaign or domain, e.g. Brand Campaign, www.google.comWhich campaign or referring domain produces leads?
Channel Drilldown 3Keyword or similar detailWhich keyword or detail produces leads?
Channel Drilldown 4Further detailAny additional breakdown needed for reporting

Field names must match exactly for the script to write values. Drilldown meanings vary by channel and by the UTM parameters used.

Frequently asked questions

What happens if a visitor leaves and returns a few days later?

The original source is stored in a cookie in the visitor's browser, so the first-touch information survives browsing around the site and a return visit within the cookie's lifetime. When the visitor submits a form, the original values are written into the hidden fields.

Which form builders are supported?

The script works with most form builders, including Gravity Forms, Jotform, Wix Forms, Webflow Forms and Squarespace Forms. The method for adding hidden fields differs by builder, and per-builder instructions exist for most of them.

Do I need UTM parameters for channel data to work?

UTM parameters determine the detail in the drilldown fields for paid campaigns. Organic arrivals are classified without them, using the referring search engine and, where available, the keyword.

What is the difference between 'no source recorded' and 'source overwritten'?

No source recorded usually means the hidden fields were missing or misnamed, so the script had nowhere to write. Source overwritten usually means a later visit replaced the original values, which the cookie-based first-touch approach is designed to prevent. Check the field names first, then the cookie behaviour.