Refreshed and republished on September 10, 2021
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 was to clear out the UTM field values after the flow ran. The new solution is to use the is set and is changed feature instead of clearing out field values.
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
Record detail page for a UTM touchpoint
Report preview
Dashboard preview
Planning
In order for this approach to work, there are 2 things you need to plan for:
- UTM fields for the Lead and Contact MUST be set up to be overwritten every time.
- 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:
- How are the UTM fields populated?
- Do the UTM fields get overwritten?
- 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:
- 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.
- 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”.
Create your fields
Next, create the custom fields for your custom object.
Field name | Field type |
---|---|
Lead | Lookup (Lead) |
Contact | Lookup (Contact) |
UTM Source | Text |
UTM Campaign | Text |
UTM Medium | Text |
Touchpoint Date | Date |
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 the trigger to run when a a record is created or updated and after the record is saved
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.
Add a decision element to the flow that will check if the UTM values are set.
Now your flow should look like this.
Add another decision element that will check if the UTM fields are updated.
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.
Connect the decision elements and the create records element. The final flow should look like this.
Create the flow for contacts
To create the flow for contacts, click save as on the lead flow and select save as new flow.
Edit the flow to start on the contact object instead of the lead object.
Edit the create records step to update the contact rather than the lead.
Here’s what my completed flow looks like for contacts.
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.
You can group by UTM Touchpoint Date to view all the touchpoints for a specific month, day, quarter, year, etc.
Questions?
Send me a tweet @jennamolby, or leave a comment below.
Receive my latest posts directly to your inbox
This Pardot article written by:
Jenna Molby
Jenna is a Salesforce Certified Pardot Specialist, Salesforce Certified Pardot Consultant and Salesforce Marketing Champion 2020. Jenna is a marketing operations leader with over ten years of B2B and B2C experience working on both the agency and client-side.
Original Pardot Article: https://jennamolby.com/how-to-capture-every-utm-touchpoint-in-salesforce/
Find more great Pardot articles at https://jennamolby.com/
Pardot Experts Blog
We have categorized all the different Pardot articles by topics.
Pardot Topic Categories
- Account Based Marketing (ABM) (7)
- Business Units (14)
- ChatGPT / AI (3)
- Completion Actions (5)
- Connectors (10)
- Custom Redirects (4)
- Data Cloud (2)
- Demand Generation (8)
- Dynamic Content (6)
- Einstein Features (12)
- Email Delivery (17)
- Email Open Rates (3)
- Pardot A/B Testing (2)
- Email Mailability (16)
- Do Not Email (1)
- Double Opt-in (2)
- Opt Out / Unsubscribe (14)
- Email Preferences Page (6)
- Engagement Studio (16)
- Industries (1)
- Non Profit (1)
- Landing Pages (9)
- Lead Generation (1)
- Lead Management (13)
- Lead Routing (3)
- Lead Scoring (16)
- Leads (3)
- Marketing Analytics – B2BMA (9)
- Marketing Automation (1)
- Marketing Cloud (3)
- Marketing Cloud Account Engagement (4)
- Marketing Cloud Growth (2)
- New Pardot Features (6)
- Opportunities (2)
- Optimization (2)
- Pardot Admin (64)
- Duplicates (1)
- Marketing Ops (1)
- Pardot Alerts (1)
- Pardot API (2)
- Pardot Automations (3)
- Pardot Careers (12)
- Pardot Certifications (4)
- Pardot Consulting (1)
- Pardot Cookies (3)
- Pardot Custom Objects (3)
- Pardot Email Builder (8)
- Pardot Email Templates (9)
- HML (6)
- Pardot Events (16)
- Pardot External Actions (1)
- Pardot External Activities (4)
- Pardot Forms (29)
- Form Handlers (8)
- Pardot Integrations (20)
- Data Cloud (1)
- Slack (1)
- Pardot Lead Grading (5)
- Pardot Lead Source (2)
- Pardot Lightning (1)
- Pardot Migration (1)
- Pardot Nurture / Drip Campaigns (1)
- Pardot Personalization (3)
- Pardot Profiles (1)
- Pardot Releases (18)
- Pardot Sandboxes (2)
- Pardot Segmentation (5)
- Pardot Strategy (7)
- Pardot Sync (2)
- Pardot Sync Errors (1)
- Pardot Tracker Domains (5)
- Pardot Training (3)
- Pardot Vs Other MAPs (4)
- Pardot Website Tracking (2)
- Reporting (22)
- Salesforce and Pardot (31)
- Marketing Data Sharing (2)
- Pardot Users (3)
- Salesforce Automation (5)
- Salesforce Flows (2)
- Salesforce Campaigns (20)
- Salesforce CRM (3)
- Record Types (1)
- Salesforce Engage (3)
- Salesforce Queues (2)
- Security and Privacy (1)
- Tags (3)
- The Authors (504)
- Cheshire Impact (9)
- Greenkey Digital (51)
- Invado Solutions (37)
- Jenna Molby (9)
- Marcloud Consulting (6)
- Nebula Consulting (60)
- Pardot Geeks (44)
- Salesforce Ben | The Drip (235)
- SalesLabX (3)
- Slalom (4)
- Unfettered Marketing (46)
- Uncategorized (1)
- Website Tracking (2)
- Website Search (1)
More Pardot Articles
See all posts
This Pardot article written by:
Jenna Molby
Jenna is a Salesforce Certified Pardot Specialist, Salesforce Certified Pardot Consultant and Salesforce Marketing Champion 2020. Jenna is a marketing operations leader with over ten years of B2B and B2C experience working on both the agency and client-side.
Original Pardot Article: https://jennamolby.com/how-to-capture-every-utm-touchpoint-in-salesforce/
Find more great Pardot articles at https://jennamolby.com/