May 1, 2026

Google Analytics and UTM Tracking in Modern Advertising: Basic Mechanics and Ethics

Introduction

Before the advent of the internet, advertising was a complete guessing game. John Wanamaker, an early 20th-century merchant and marketing pioneer, sums up the pre-internet advertising dilemma perfectly in his (notably apocryphal) quote, "Half the money I spend on advertising is wasted; the trouble is I don't know which half."

In the advertising world, this issue is known as the Wanamaker dilemma. In the post-internet world, the dilemma is fueled by dark traffic: web traffic that refers users to your website URL but isn't properly tracked. The issue with dark traffic is that advertisers cannot discern which users respond to which advertisements. This is a major issue: did consumers react more to the 5,000 Facebook ads that cost $1,000, or to a free, well-timed post on X? Knowing exact analytics allows advertisers to spend funds with maximum efficiency and show traceable, reliable results to their C-Suite associates.

So, how do advertisers track their website user acquisition and avoid dark traffic? Many advertisers' first answer would probably be Google Analytics, which is correct. Google Analytics (specifically Google Analytics 4) is the industry standard in e-commerce and consumer activity tracking on websites. On its own, Google Analytics can track referrals, organic search, and direct search traffic. But what about newsletters, emails, social media posts, or other links that don't fit these categories?

Traditionally, Google Analytics would group unidentified traffic into the direct search traffic metric, skewing attributions and increasing dark traffic. In modern analytics tracking, however, Google Analytics utilizes the Urchin Tracking Monitor, commonly referred to as a UTM.

Urchin Tracking Module Acquisition

Pre-Google Analytics, UTMs originated from the Urchin Software Corporation, specifically their product called Urchin Traffic Monitor. Before Google Analytics existed, Urchin developed these parameters in 2002 to help digital marketers track the effectiveness of their campaigns by appending specific data directly to URLs. Google acquired the company in 2005 to serve as the foundation for Google Analytics, which they saw as the solution to the "dark traffic" issue that advertisers faced when going to buy ads on Google. Google Analytics kept the "UTM" acronym as a legacy of the original software.

UTM Mechanics

A UTM is a snippet of text added to the end of a URL that doesn't change the destination of the link, but feeds Google Analytics specific details about user acquisition. Links that utilize UTMs are often referred to as "tagged" links. UTMs are formatted and sorted using UTM parameters, which fall into 5 categories:

ParameterRequired?Purpose
utm_sourceYesIdentify the advertiser or site
utm_mediumYesThe advertising or marketing medium
utm_campaignYesThe individual campaign name
utm_termNoIdentify paid search keywords
utm_contentNoDifferentiate similar content/links

These parameters are added after a normal URL, separated by a question mark. The question mark essentially tells your browser that the web address is ending, and data tracking parameters come next. Parameters also include parameter value pairs (=) between the type of parameter and the value of the parameter, as well as the "glue" between parameters (&). It is also important to note that a computer would identify utm_source=newsletter and utm_source=Newsletter as two different parameters and split the data into two sections. Professionals follow naming conventions to avoid this, often using exclusively lowercase and underscores instead of spaces.

Example UTM Link

While a normal URL only states the destination path of the website, a URL with UTM parameters includes several functional layers:

www.URL.com/tagged — Base URL: The destination path

? — Separator: Marks the start of the query string

utm_source=news — Param 1: Identifies the specific source

& — Glue: Separates multiple parameters

utm_medium=email — Param 2: Identifies the marketing channel

& — Glue: Separates multiple parameters

utm_campaign=sale — Param 3: Identifies the specific promotion

Queries

Put more technically, in this case, anything included after the URL is not a part of the pathing of the URL, and is known as a query. Queries are an umbrella term for the key-value pairs that comprise the query string. Queries are a universal method (not just Google Analytics specific) for passing data to a web server to filter content, track sessions, or trigger specific functions on a page.

Document Object Model (DOM)

But what happens after a user clicks a tagged link? How does the information make its way into the Google Analytics database? The lifecycle of a UTM tag, from click to logging, begins with the browser's Document Object Model, or DOM. A DOM is a programming interface that essentially translates an HTML web page into readable components for other programming languages to interact with the page.

In the DOM, there are different levels of information, called objects. The window object represents the entire browser window (buttons, text, URL, etc.). Within the window object is the window.location object, which stores all the information about the web address that you are visiting. Within that object, the query string is stored under window.location.search.

When an analytics tool (such as Google Analytics) is installed on a web page, it essentially asks the DOM what is being stored in window.location.search. The browser responds with the query string, and the values are reported to the analytics software.

Cookie Types

Notably, DOM information does not track user identity, which can be extremely useful for analytics. That is where cookies, which store small amounts of information in plain text files, come in. Cookies can "remember" a user, allowing a website to enhance the user experience and enabling analytics technology to differentiate between returning and new users. There are four types of cookies:

1. First-Party Cookies

Set by the website you're visiting. They log simple things: login credentials, language preference, what you add to your shopping cart, etc. First-party cookies are what keep you logged into a website if you leave and return later.

2. Third-Party Cookies

Set by domains outside of the website you are visiting. This is most commonly used by analytics services and advertisers, who use third-party cookies to build a profile of consumers across multiple sites to help serve targeted advertisements.

3. Session Cookies

Temporary cookies that only track you as long as your browser is open. They allow websites to keep you logged in while navigating between pages, or keep items in your shopping cart after reloading the page.

4. Persistent Cookies

Remain on your browser for an extended period of time, even after closing your browser. They have a predetermined expiration date set by the website you are visiting, ranging anywhere from days to years in length. While convenient for consumers, they raise privacy concerns as extended tracking can lead to detailed user profiling without the user's knowledge.

The type of cookies that Google Analytics uses are known as first-party cookies. Using cookies allows Google Analytics to know if, for example, a user views an item, adds it to their cart, leaves for 20 minutes, and then comes back and purchases the item. This allows the original utm_source to receive credit for the transaction, which can be extremely useful in tracking web campaigns.

Mechanics Summary

To summarize, Google Analytics 4, the industry standard in analytics technology, installs query strings to the end of a website's URL. When Google Analytics goes to access this data, the browser's DOM translates all the website information from HTML to JavaScript-friendly information. Within the DOM, the previously installed query strings are stored in the window.location.search object, which is sent to the Google Analytics database and stored depending on the user's first-party cookies.

Ethics

While Google Analytics and UTMs have essentially solved the Wanamaker dilemma for advertisers, they operate in an ethical grey area. Although massive amounts of data about consumers are groundbreaking for advertisers, the issue with the datafication of online interaction is that it threatens privacy.

The main ethical concern comes when users are unaware that their information is being tracked. While some sites require user consent to track cookies, often analytics tracking is more subtle and is done in the background, regardless of whether the user knows or not. Organizations can compile information gathered through persistent cookies and form complete profiles on consumers regardless of their consent. These profiles can be used by advertisers to sell directly to their target audience; an outcome that can be seen as, at best, mutually beneficial and, at worst, predatory.

Regulation Efforts

The ethical dilemma associated with analytics tracking has led to a global legislative response. The largest is the General Data Protection Regulation (GDPR) in the European Union, which puts the responsibility to protect users' data on the advertiser rather than the user. Under GDPR, users are required to opt in to data tracking rather than opt out as a default. This is the reason that "allow cookies" banners have become commonplace around the internet.

In the United States specifically, the California Consumer Privacy Act (CCPA) offers a similar framework, giving consumers the right to know what data is collected and the right to opt out of their information being sold to third parties. These protections create a gap in the data for advertisers, who lose analytics whenever a user fails to opt in to data collection. This brings back elements of the Wanamaker dilemma, as the tie between clicks and metrics is loosened to protect the consumer's right to own their data.

A Cookieless Future

The discussion and implementation of the GDPR and CCPA have led to an evolution in browsing software. Prominent examples include Safari and Firefox blocking third-party cookies by default, and Chrome phasing out third-party cookies altogether, moving toward an environment in which consumers are protected, but developers are still able to build thriving online businesses.

This shift away from third-party cookies has created an environment in which UTM parameters are even more important, as they offer a more privacy-friendly way of tracking user activity. They tell the advertiser where the user came from, but not necessarily who the user is across the entire internet. While functionally less efficient for the advertiser, it provides a similar level of data while protecting consumer rights to privacy.

Conclusion

With the launch of Google Analytics in 2005, online advertising has effectively eliminated the Wanamaker dilemma. UTMs allow campaign metrics to see essentially every click of a button that consumers take, which has greatly eliminated dark traffic and made advertising a much more measured practice.

That being said, surgical precision in metrics comes at a price: maintaining ethical advertising practice. As advertisers continue to track campaigns, it's important to maintain as much transparency towards the consumer as possible. This includes transitioning away from third-party cookies and full user profiling toward transparent and ethical first-party cookies, as well as passing further legislation to protect consumers' right to own their privacy online.

Google Analytics' use of UTMs makes it an extremely powerful tool, bridging the gap between data-driven efficiency and consumer privacy. Ultimately, the goal of modern advertising should not be to track every footprint, but to use that data to create a more relevant, respectful, and ethical digital experience for everyone.