Craftshift logo

How to use UTM parameters for Shopify marketing

How to use UTM parameters for Shopify marketing

UTM parameters Shopify merchants attach to outbound links are the cleanest way to track which campaign, channel, or creative actually drove a sale. Without them, every click looks the same in your analytics dashboard.

If you have ever opened GA4, seen a spike in “direct” traffic, and had no idea which Instagram post or newsletter caused it, that is a UTM problem. The fix takes ten minutes per campaign and pays off for the life of the store.

This guide walks through the five UTM parameters, how to build links the right way, how to read the data in GA4, and the templates we use across email, social, and paid ads. You will also see the mistakes that quietly break attribution for months before anyone notices.

In this post

What UTM parameters are

UTM stands for Urchin Tracking Module, a relic from the analytics company Google bought back in 2005. The name stuck. The idea is simple: append a few key/value pairs to the end of any URL, and analytics tools will read them and group sessions by source.

A tagged link looks like this:

https://yourstore.com/products/leather-tote?utm_source=newsletter&utm_medium=email&utm_campaign=spring-launch

The product page loads exactly the same way for the visitor. But your analytics now know the click came from the spring launch newsletter, not random direct traffic.

The five UTM parameters explained

There are five parameters in total. Three are required for any decent report. Two are optional and mostly matter for paid search.

ParameterRequiredPurposeExample
utm_sourceYesWhere the click came fromnewsletter, instagram, google
utm_mediumYesThe marketing channelemail, social, cpc, affiliate
utm_campaignYesThe specific campaign namespring-launch, bf-2026
utm_termOptionalPaid keywordleather+tote
utm_contentOptionalA/B test or creative variantcta-top, banner-red

Source answers “where”. Medium answers “how”. Campaign answers “why”. Get those three right and 90 percent of your reporting works.

Use utm_term when you run paid search and want to track which keyword fired the ad. Use utm_content when you have two versions of the same ad or two CTAs in the same email and need to compare them.

You can hand-write UTM links, but that gets messy fast. A typo in utm_medium=emial creates a brand new traffic source in GA4 that you have to clean up later. Use a builder.

Our free UTM Builder generates clean, lowercase, hyphenated links that follow Google’s recommended format. Drop in the destination URL, fill in source/medium/campaign, and copy the result.

  1. Use lowercase only. GA4 treats Facebook and facebook as two different sources.
  2. Replace spaces with hyphens, never underscores or pluses.
  3. Keep campaign names short and predictable: bf-2026, not black-friday-2026-final-FINAL-v2.
  4. Document your conventions in a shared sheet. Every team member uses the same pattern.
  5. Test the link in an incognito window before sending it out.

If you run multiple stores or work with an agency, a naming convention sheet is the one document you cannot skip. We have seen six months of campaign data become unreadable because two people spelled “instagram” three different ways.

Tracking UTM data in GA4

GA4 picks up UTM parameters automatically. You do not need to install anything. The data lands in Reports > Acquisition > Traffic acquisition, grouped by Session source / medium.

To see campaign-level breakdowns, switch the dimension to Session campaign. To see content variants, add Session manual ad content as a secondary dimension. Both are one-click changes.

For ecommerce reports, link Shopify revenue events to your UTM campaigns by enabling enhanced ecommerce. Once that runs, you will see purchase events tied to each campaign in Monetization > Ecommerce purchases. From there it is one filter to revenue per UTM campaign.

If you also want to compare ad spend against revenue, you will need both numbers in the same place. Our ROAS Calculator handles the quick math when you do not want to build a GA4 exploration.

Common UTM mistakes

The mistakes below are not theoretical. Each one shows up in roughly half the Shopify GA4 accounts we audit.

UTM templates for email, social, and ads

Email

?utm_source=klaviyo&utm_medium=email&utm_campaign=newsletter-2026-04&utm_content=hero-cta

Source is the ESP. Medium is always email. Campaign includes the year and month so you can sort chronologically. Content tells you which CTA in the email fired.

Organic social

?utm_source=instagram&utm_medium=social&utm_campaign=spring-launch&utm_content=reel-1

Use social for organic posts and paid-social for boosted or ad campaigns. Mixing them in the same medium makes ROAS reporting impossible.

Paid ads

?utm_source=google&utm_medium=cpc&utm_campaign=brand-2026&utm_term=leather-tote&utm_content=ad-variant-a

Google Ads can auto-tag with GCLID, but UTMs work alongside GCLID and give you a backup source of truth. Meta Ads, TikTok, and Pinterest all support UTM passthrough in the URL builder of each ads manager.

Measuring ROI with UTM

UTM parameters are inputs. ROI is the output. The link between the two is a spreadsheet or a dashboard that joins ad spend (from your ads manager) with revenue (from GA4 or Shopify) keyed on the campaign name.

Once that join exists, you can answer the questions that actually matter: which campaign returned 4x, which one barely covered fees, and which channel drives repeat customers. Layer in customer lifetime value and you are running the same playbook the bigger DTC brands run.

Speaking of fees, every dollar you take in is also subject to payment processing costs. Our breakdown of Shopify transaction fees walks through what hits the margin before you even calculate ROAS.

If your store sells a lot of variant-driven products, attribution gets harder when shoppers click through on a swatch. Worth reading the Shopify variant images guide for context on how variant URLs interact with campaign tracking.

Stores that split SKUs into separate listings (with something like combined listings) get even cleaner UTM data because each variant has its own canonical URL that the tracking lands on.

FAQ

Do UTM parameters hurt SEO?

Only if you put them on internal links. Internal UTMs create duplicate URLs that Google has to crawl and consolidate. On outbound, cross-site, or campaign links, UTMs are invisible to SEO.

Can I use UTM on Shopify checkout links?

Yes. Shopify carries query strings through the cart and into checkout, and GA4 will read them. Make sure you are tagging the product or collection URL, not the cart URL directly.

Should I tag every social media post?

Tag every link that lives in a bio, CTA, or paid placement. Organic post links inside captions get stripped on most platforms anyway, so do not waste time tagging Instagram captions that are not clickable.

What is the difference between utm_source and utm_medium?

Source is the specific origin (instagram, mailchimp, google). Medium is the broad channel category (social, email, cpc). One is a name, the other is a bucket.

Will UTMs slow down my Shopify store?

No. UTMs are query string parameters that the page ignores at render time. They have zero impact on Core Web Vitals or Shopify performance.

How long do UTM parameters last?

The parameter lives in the URL for that single visit. GA4 stores the attribution in a session-level field, which by default holds for 30 days. Direct return visits inside that window still credit the original UTM source.

Can I shorten UTM links?

Yes. Bitly, Rebrandly, or your own short domain all preserve the UTM parameters in the redirect. The destination URL still loads with the full query string.

Ready to clean up your campaign tracking? Build your first link with the UTM Builder, then check the result in GA4 the next morning. If you want a dedicated app for variant-aware tracking on product pages, install Rubik Variant Images from the Shopify App Store.

Our Shopify Apps

Smart Bulk Image Upload

Bulk upload product images from Google Drive & save time!

Rubik Variant Image & Swatch

Show only relevant variant images on your product pages.

Rubik Combined Listings Swatch app

Rubik Combined Listings

Link separate products as variants with beautiful swatches

CS – Export Product Images

Bulk export product images by vendor, collection or status

Blog Posts