Introduction:
An urchin tracking module (UTM) is a snippet of code added to a URL for the purpose of tracking online marketing performance and better understanding audience behaviour.
With UTMs, ClientView can attribute leads to their correct source, distinguishing between leads from paid ads (like Facebook) and organic sources without needing multiple forms and landing pages.
UTMs facilitate advanced ad tracking, enabling ClientView to show top-performing ads and provide detailed insights into what makes winning ads for your niche. This works when a contact inside your client’s CRM has an assigned “Contact Lead Source” before being sent to ClientView’s webhook.
Ensure to update your client’s account snapshot to push updates across all sub-accounts simultaneously instead of manual setups
How to setup UTM tracking
Step 1: Lead Form Inputs
Create New Input Fields:
Navigate to “Sites” in GoHighLevel.
Click “Forms” and select “Builder”.
Open your primary lead capture form.
Create four new hidden input fields: UTM Content, UTM Campaign, UTM Source, UTM Medium.
Save the form.
Step 2: Install UTM capture script on funnel
Navigate to Sites
Go to "Funnels" or "Websites" depending on where your clients opt-in pages are hosted
Open the opt-in page editor
Open "Tracking Code"
Paste the following code in the "Footer"
<script> // Function to get UTM parameters from the URL function getUTMParameter(param) { var urlParams = new URLSearchParams(window.location.search); return urlParams.get(param) || ''; // Return the parameter value or an empty string if not found } // Function to set UTM parameters to hidden fields in the form function setUTMParametersToForm() { // Get UTM parameters from the URL var utmSource = getUTMParameter('utm_source'); var utmContent = getUTMParameter('utm_content'); var utmMedium = getUTMParameter('utm_medium'); var utmCampaign = getUTMParameter('utm_campaign'); // Set UTM parameters to the form's hidden fields var form = document.querySelector('form'); // Adjust this selector to target your specific form if necessary if (form) { form.querySelector('input[name="UTM Source"]').value = utmSource; form.querySelector('input[name="UTM Content"]').value = utmContent; form.querySelector('input[name="UTM Medium"]').value = utmMedium; form.querySelector('input[name="UTM Campaign"]').value = utmCampaign; } } // Wait for the DOM to be fully loaded before running the function document.addEventListener('DOMContentLoaded', setUTMParametersToForm); </script>
Step 3: Create Contact Workflow
Workflow Creation:
Create an “On form-submit” workflow that creates a contact, ensure the basic fields are added:
First name : Contact -> First Name
Last name : Contact -> Last Name
Email : Contact -> Email
Phone : Contact -> Phone
Add “Contact Source” fill with the
UTM Source
received from the form.Add “UTM Campaign” fill with the
UTM Campaign
received from the form.Add “UTM Content” fill with the
UTM Content
received from the form.Add Fill “UTM Medium” fill with the
UTM Medium
received from the form.
Webhook Setup:
Create a “POST” Webhook action step.
Paste the “Lead” webhook URL from your ClientView account.
Save the workflow.
Step 4: Setup UTM Parameters (Ad Platforms)
Facebook Ads:
Parameters:
utm_source=Facebook&utm_medium=###{{adset.name}}&utm_campaign=###{{campaign.name}}&utm_content=###{{ad.name}}
Facebook Ads Manager:
Go to Facebook Ads Manager.
Navigate to each clients active campaign
Open each active ad
Scroll down to the "Tracking" section.
Paste the UTM parameters script in the “URL Parameters” field.
Repeat for all clients + all ads
Save your changes.
These parameters pull the following data:
UTM Source: "
Ad Platform Name
"UTM Campaign: "
Campaign name
"UTM Medium: "
Ad Set name
"UTM Content: "
Ad Name
"
Step 5 - Sync Update (Push to all accounts)
Go to agency settings and navigate to snapshots. Find the snapshot you have made adjustments and click "Update".
This will carry out the updates made to all sub-accounts who use it.
If you do not use a snapshot you will need to make these adjustments manually in each sub- account, our team is happy to assist. Book a setup call here
Optional: Hard Coding Source
An alternative to UTM tracking if you would prefer not to track ad campaigns data and are looking for the easiest solution to track client leads from your funnel over facebook reported leads you may hard code the source.
To hard code the source simply input "Facebook ads" as the contact source when creating new leads, wether this be through form submission, zap or facebook form submissions.
After the contact is created with the contact source being "Facebook ads" then create the POST webhook action and paste your clientView lead webhook there.
Save the workflow, push snapshot update and you are done.