We’re Heading to CNX ’25. Let's Meet in Chicago! Join HIC at Salesforce Connections'25 for conversations, collaboration, and co-creation.

Implementing UTM parameters in your Salesforce email campaigns and tracking the data in Google Analytics (GA4) can significantly enhance your ability to analyze and optimize marketing efforts.

Say, for instance, You have launched a campaign where emails are being sent from Salesforce, and each email contains a redirect link to your website. As users click on these links, they land on your website, but users are also coming from different sources such as social media platforms, search engines, or referral websites. Now, to better understand your audience and optimize your marketing efforts, you want to track and analyze the source of your users, i.e., where they are coming from.

By leveraging UTM parameters and integrating them with Google Analytics, you can accurately attribute the source of your website traffic. This enables you to identify which sources drive the most visitors to your site, evaluate the effectiveness of your marketing campaigns, and make data-driven decisions to enhance your overall marketing strategy.

So, here we will go through the step-by-step process of setting up UTM parameters in your Salesforce emails, configuring Google Analytics to capture the UTM data, and analyzing the results to gain actionable insights.

Process of Tracking Salesforce Email using UTM Parameters and Google Analytics are:-

Setting Up Google Analytics:

To start, we will set up Google Analytics (GA4) using Google Tag Manager by following the below steps.

First, create a Google Analytics account at analytics.google.com. Once you have entered all the necessary information, set the initial data stream as “Web” and provide your website URL.

set the initial data stream as "Web"

Next, set up a Google Tag Manager account by creating a new account at tagmanager.google.com/.

And we will be redirected to this screen.

create a new account

Within Google Tag Manager, you can configure tags for Google Analytics and choose triggers to activate those tags.

choose triggers to activate those tags

To set up Google Tag, you will need to provide your measurement ID, which can be obtained from your Google Analytics account.

you will need to provide your measurement ID

Additionally, you will need to set up the appropriate triggers to activate the tags based on specific page actions.

you will need to set up the appropriate triggers

Once you have completed the Google Tag setup, add a tag for your GA4 instance.

add a tag for your GA4 instance

After completing the setup, remember to publish your changes. Then, copy the script for embedding the tags into your website. You can access this window by clicking on your Tag number in the navigation bar.

copy the script for embedding the tags into your website

Finally, paste this tag in the header of your website, Google Tags will be applied and your website will start sending data to Google Analytics (GA4).

start sending data to Google Analytics (GA4

If you are also getting Analytics data from your site then move to the next step.

Adding UTM Parameters:

We are adding UTM Parameters to our website to get a source of our traffic. As in this scenario, we are trying to get data of users coming from salesforce emails.

For that, we have to configure our Tag in Google Tag Manager.

In our Google Tag, we have to add these parameters(These parameters are the corresponding parameters that are aligned with the UTM parameters).

add these parameters

After this configuration, we can publish the changes in Google Tag Manager.

Now, we can add UTM Parameters corresponding to these parameters to get the required data in Google Analytics(GA4).

For putting UTM parameters in your URL you can go to ga-dev-tools.google/campaign-url-builder/.

Here you can give values for the parameters and it will generate a link with UTM parameters

it will generate a link with UTM parameters

Testing UTM Parameters:

Now after all the configurations are done and we have our website link with UTM parameters, we can test this by creating an email template in Salesforce and sending our website in that.

Here is an example template that I created with the link:

Here is an example template that I created with the link

After clicking on this user will be redirected to our website and its data will be sent to Google Analytics there we can filter our traffic by source/medium and can get users that we got from our salesforce emails in our campaign.

Note: Data can take up to 24 hours to be reflected in Analytics Dashboard and reports.

user will be redirected to our website

Conclusion:

By following the steps outlined in this guide, you’ve established a connection between your email campaigns and website traffic, enabling you to gather valuable insights into user behavior and traffic sources. By consistently monitoring and analyzing this data, you can make informed decisions to optimize your email campaigns, allocate resources effectively, and maximize the return on investment for your marketing efforts. Remember to periodically review and refine your UTM parameters based on evolving campaign strategies and goals.

That wraps up today’s blog. We will be back with another interesting Salesforce development solution soon. Till then, stay tuned! If you have any questions or need assistance with your Salesforce implementation, feel free to contact us.

Related Articles
Expert Guide On Utilizing Agentforce for Seamless Quote & Case Creation

When it comes to managing customer journeys in Salesforce, speed and accuracy matter. That’s where Agentforce, a powerful extension layer, comes into play. Whether spinning up a new quote from an opportunity or logging a support case from a contact, Agentforce can help streamline these actions with minimal clicks and maximum context. In this blog, […]

Read More
How to Use Platform Events in Salesforce Flow for Real Time Updates

Platform events in Salesforce Flow are a great tool for creating real-time, event-driven apps that automate business operations with precision and speed. By integrating Platform Events’ publish-subscribe approach with Salesforce Flow‘s low-code features, you can automate processes, allow real-time system interaction, and optimize how your organization manages dynamic data changes. This guide will demonstrate how […]

Read More
Build a Dynamic Salesforce Data Viewer with hange kardo bas LWC

Lightning Web Components (LWC) is a modern JavaScript framework that is used for building responsive, dynamic applications on the Salesforce platform. In LWC, data flows from parent-to-child component. Variables marked as @api in the child component are open for a parent to pass values directly into the child’s HTML template, making the component interactable. To […]

Read More
Expert Guide On Nominal XIRR Calculation Using LWC in Salesforce

When building financial tools within Salesforce, handling irregular cash flows with precision is a must. Whether you’re developing investment trackers, portfolio performance dashboards, or funding monitors, calculating Nominal XIRR (Extended Internal Rate of Return) becomes essential. In this blog, you’ll learn how to build a Lightning Web Component (LWC) in Salesforce that calculates Nominal XIRR […]

Read More
Beginners Guide to Making Your LWC Component Multilingual

If you’re wondering how to make your LWC component multilingual, you’re already ahead of the curve. Global users expect content in their native language, and Salesforce gives you the tools to deliver exactly that. With Custom Labels and the Translation Workbench, you can easily localize your Lightning Web Components without touching a single line of […]

Read More
Hands-On Guide Building a Drag-and-Drop Form Builder Using Lightning Web Components

Drag-and-drop interfaces are a user experience staple, and when paired with the power of Lightning Web Components (LWC), they unlock dynamic, highly interactive Salesforce components. In this blog post, we’ll walk you through how to build a custom drag-and-drop form builder in LWC. Users can drag form fields like text inputs and dropdowns into a […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818