Categories

Getting Started

Learn through 101 guides and easy solutions.

How to Capture Every UTM Touchpoint in Salesforce

How to Capture Every UTM Touchpoint in Salesforce

min. reading

This post was originally published on February 2, 2021. After this post was published, Salesforce released the ability to check if a field has been changed. Previously, the solution to capture every UTM touchpoint in Salesforce was to clear out the UTM field values after the flow ran. The new solution is to use the is changed feature instead of clearing out field values.

Refreshed and republished on September 10, 2021

The Concept

If a lead or a contact’s fields for UTM Source, UTM Medium and UTM Campaign have a value, run a Salesforce Flow to create a record in a custom object. The process will run again whenever the UTM information is updated.

UTM touchpoints displayed on the lead layout

UTM touchpoints displayed on the lead layout

Record detail page for a UTM touchpoint

Record detail page for a UTM touchpoint

Report preview

Report preview

Dashboard preview

Dashboard preview

Planning

In order for this approach to work, there are 2 things you need to plan for:

  1. UTM fields for the Lead and Contact MUST be set up to be overwritten every time.
  2. What to do if there’s EXISTING UTM data in these fields to prevent data loss.

I recommend you review how your UTM fields are currently populated, what data currently exists in these fields and what reports/automations, etc rely on these fields. You should be able to answer these questions before getting started:

  1. How are the UTM fields populated?
  2. Do the UTM fields get overwritten?
  3. What are we going to do with existing data?

What to do if you have existing data

There are plenty of options on how to get this to work if you have existing data in your UTM fields. It all depends on your current setup. Here are some ideas:

  1. Create new fields named “First UTM Source”, “First UTM Medium”, etc. Rename your CURRENT UTM field labels (not API names) as “Last UTM Source, “Last UTM Medium”, etc. Populate the “First UTM” fields with your current data and use the “Last UTM” fields in your Flow.
  2. Once the UTM custom object is set up, use DataLoader.io to create records using all the existing UTM values.

Create the custom object

Create the custom object. I named by object “UTM Touchpoint”.

UTM touchpoint custom object 1
UTM touchpoint custom object 2

Create your fields

Next, create the custom fields for your custom object.

Field nameField type
LeadLookup (Lead)
ContactLookup (Contact)
UTM SourceText
UTM CampaignText
UTM MediumText
Touchpoint DateDate

You can also create any other fields you want to track using this object. For example, UTM Term or UTM Content.

Create the Flow for Leads

Navigate to the Flow builder and create a new Flow. Select Record-Triggered Flow as your Flow type.

Configure Lead Flow - Step 1

Configure the trigger to run when a a record is created or updated and after the record is saved

Configure Lead Flow - Step 2

Select the Lead object as the starting object and add in the filters that will trigger your flow. For this example, I want to trigger the flow when UTM Source, UTM Medium AND UTM Campaign have values.

Configure Lead Flow - Step 3

Add a decision element to the flow that will check if the UTM values are set.

Configure Lead Flow - Step 4

Now your flow should look like this.

Configure Lead Flow - Checkpoint 1

Add another decision element that will check if the UTM fields are updated.

Configure Lead Flow - Step 5

Add a create records element to the Flow that will take the UTM values from the lead and set the values for the UTM Touchpoint object.

Configure Lead Flow - Step 6

Connect the decision elements and the create records element. The final flow should look like this.

Final Lead Flow

Create the flow for contacts

To create the flow for contacts, click save as on the lead flow and select save as new flow.

Configure Contact Flow - Step 1

Edit the flow to start on the contact object instead of the lead object.

Configure Contact Flow - Step 2

Edit the create records step to update the contact rather than the lead.

Configure Contact Flow - Step 3

Here’s what my completed flow looks like for contacts.

Final Contact Flow

Creating reports

You can create reports by using one of the predefined UTM report types. The report type “UTM Touchpoints” will allow you to pull a report of ALL UTM touchpoints for both leads and contacts.

UTM Touchpoint Report 1

You can group by UTM Touchpoint Date to view all the touchpoints for a specific month, day, quarter, year, etc.

UTM Touchpoint Report 2
UTM Touchpoint Report 3

Questions?

Send me a tweet @jennamolby, or contact the Sercante team for help.

Subscribe to The Spot

Hidden
Hidden
Hidden
Hidden

Categories

Top 3 Recent Post

  • Jenna is a Marketing Operations leader with over 10 years of experience working with both enterprise organizations and start-ups. She started her career as a consultant, helping B2B and B2C clients get the most out of Marketo, Pardot, Marketing Cloud and Salesforce. She then moved in-house, working with B2B SaaS companies, helping them build their sales and marketing technology stacks and processes from scratch.

Leave Your Comment

Related Articles

Bot Single Post