Skip to content
ChatGPT Image Apr 26, 2025, 08_48_38 PM

What Are UTM Codes & How to Use Them

If You're Not Using UTM Codes, You're Flying Blind

One of the biggest mistakes businesses make in their marketing efforts is not knowing which actions are working. If you’re spending time and money on social media, email campaigns, or digital ads—but don’t know which ones are actually driving results—you’re leaving insights (and profits) on the table.

That’s where UTM codes come in.


What Is a UTM Code?

A UTM (Urchin Tracking Module) code is a simple tag added to the end of a URL. It helps you track the source, medium, and campaign that drove traffic to your website using tools like Google Analytics or HubSpot.

Here’s a basic example:

https://yourwebsite.com/landing-page?utm_source=facebook&utm_medium=cpc&utm_campaign=spring-sale

 

This link tells your analytics platform three key things:

  • Source: The platform (e.g., Facebook, Google, LinkedIn)

  • Medium: The channel type (e.g., cpc = paid ads, email, social)

  • Campaign: The name of your marketing effort (e.g., spring-sale)


Why UTM Codes Are So Important

1. They Tell You What’s Working

Want to know whether your Instagram Story or your weekly newsletter is driving more signups? UTM codes give you hard data so you don’t have to guess.

2. They Help You Optimize Your Spend

If you’re running paid campaigns on multiple channels, UTM data helps you identify which one gives you the best ROI.

3. They Let You Track the Full Funnel

When combined with CRM platforms like HubSpot, UTM codes let you connect top-of-funnel traffic (like ads) with bottom-of-funnel actions (like purchases).

4. They Improve Collaboration

When you use a consistent UTM naming convention, your team—and your clients—can clearly see what’s performing and why.


How to Add UTM Codes to Your Links

You can build UTM-tagged URLs manually, or use a tool like Google’s Campaign URL Builder:
https://ga-dev-tools.web.app/campaign-url-builder/

Google_campaign_builder

 

You’ll typically fill out:

  • Website URL – the destination

  • Campaign Source – e.g., facebook, newsletter, youtube

  • Campaign Medium – e.g., cpc, email, social

  • Campaign Name – e.g., spring_promo, product_launch

Optional:

  • Campaign Term – for paid keywords

  • Campaign Content – to differentiate creatives or CTA buttons

How Landing Pages Capture UTM Codes with Hidden Fields

Once a visitor clicks on a UTM-tagged link, the parameters (like utm_source=facebook) are passed into the landing page URL. Marketers can use JavaScript to detect these values and automatically populate hidden fields within a form on the page. These hidden fields are not visible to users, but they store the UTM data when someone fills out the form—preserving information about where the lead came from. This makes it possible to trace signups or purchases back to specific campaigns, platforms, or content pieces.

ChatGPT Image May 2, 2025, 10_29_43 AM

Contact Record Made - We're Done!

Once the form is submitted with the UTM parameters captured in hidden fields, those values are stored alongside the user's contact information in your CRM or database. This means every new lead can be directly tied back to the exact ad, platform, and campaign that brought them to your landing page. With this setup, you gain full-funnel visibility—knowing not just who signed up, but where they came from and why they converted. This attribution data becomes the foundation for smarter marketing decisions and better ROI analysis.

ChatGPT Image May 2, 2025, 10_43_34 AM


Pro Tip: Use UTM Codes Everywhere

Wherever you're linking to your site—whether it’s in an email, ad, LinkedIn post, or even a QR code—add a UTM code. Just be consistent in your naming so you can segment results cleanly.


AI Makes Attribution Smarter

UTM codes give you the raw data—but what if you could automatically analyze all that traffic, segment user behaviour, and predict which campaigns will perform best?

That’s where AI comes in.

By integrating AI into your marketing funnel, you can detect patterns across channels, forecast customer value, and optimize campaigns in real time. Whether it’s identifying which ad creative leads to purchases or spotting segments that are most likely to convert, AI turns your data into decisions.

At Black Anvil, we combine UTM tracking, CRM integrations, and AI-powered analytics to give you clear visibility into your marketing performance—without needing a data science degree. We help brands move from guesswork to growth.

Want to see how AI-powered attribution can transform your marketing strategy?