How To Add UTM and Referrer Data to Salesforce Leads

Being able to keep track of online marketing sources inside Salesforce CRM is a common need. This How To guide outlines the steps needed to configure Salesforce to store additional fields and instructions to set up visitor tracking necessary for gathering UTM and Referrer informations along with lead collection.

In Salesforce Setup

Open Home – Objects and Fields – Object Manager.

(Note: this guide assumes Lightning Experience is being used; legacy UI versions might have slightly different menu.)

Select Lead. Open Fields & Relationships and click New.

Choose following settings in Steps 1 and 2:

  • Data Type – Text,
  • Field Label – Referrer URL
  • Length – 255
  • Field Name – Referrer_URL

On ‘Step 3. Establish field-level security’ make sure the user that is used in integration has access to the field. Default values are sufficient most of the time.

On Step 4, click ‘Save & New‘.

Proceed adding following fields, using values below as Field Labels, setting Data Type to Text and Length to 255 and leaving everything else by default (similar to how Referrer URL was added):

  • UTM Source
  • UTM Medium
  • UTM Campaign
  • UTM Term
  • UTM Content

You can also add other fields such as ‘GA Cookie’ if you’d like Google Analytics Users Explorer Client Id to be present in Salesforce Lead, for example.

In Formsable

If you’re using Formsable to capture leads on the website, it will automatically recognise that Salesforce Leads now have new fields and will populate them with the available data.

To configure Formsable to send leads to Salesforce, open API Credential‘ in Formsable UI and click Connect – Salesforce:

Then, use Outbound Integrations – Add to enable sending of Leads tracked by Formsable to Salesforce: