The Ecommerce UTM Guide: Copy Paste Templates for 6 Ad Platforms

Portrait of Juan Garzon
Juan Garzon
-
5 min read
-
August 25, 2026
UTM parameter templates for six ad platforms shown as monospaced code cards.

Every reporting problem that starts with "why is so much of our traffic in direct" ends at the same place: tagging. UTM parameters are the only mechanism that reliably tells your analytics where a visitor came from, and unlike almost everything else in measurement, they are entirely under your control. No browser change, consent regime, or platform policy shift affects whether you put the right value in utm_source. This guide gives you working templates for the six platforms most ecommerce brands run, plus the conventions that make the resulting data groupable rather than merely present.

Every reporting problem that starts with "why is so much of our traffic in direct" ends at the same place: tagging. UTM parameters are the only mechanism that reliably tells your analytics where a visitor came from, and unlike almost everything else in measurement, they are entirely under your control. No browser change, consent regime, or platform policy shift affects whether you put the right value in utm_source. This guide gives you working templates for the six platforms most ecommerce brands run, plus the conventions that make the resulting data groupable rather than merely present.

The Structure Before the Templates

Five parameters exist. Three matter constantly, two matter situationally.

ParameterPurposeRule
utm_sourceThe platformOne fixed value per platform, never varied
utm_mediumThe type of trafficA small controlled vocabulary, never free text
utm_campaignThe campaignStructured, machine parseable
utm_contentAd or creative levelUsed for creative analysis
utm_termKeywordSearch only, usually auto populated

The most important rule is that utm_source and utm_medium must come from a fixed list. Once someone writes Facebook where the convention is facebook, or cpc where the convention is paid_social, your channel grouping fragments and every report built on it becomes wrong in a way that is tedious to unwind.

A workable controlled vocabulary for utm_medium in ecommerce:

  • paid_search for search advertising
  • paid_social for social advertising
  • paid_shopping for shopping and product listing campaigns
  • display for display and programmatic
  • video for video placements bought as video
  • email for owned email
  • affiliate for affiliate and partner traffic
  • influencer for creator content
  • referral for genuine referrals

Nine values. If a tenth is needed, it gets added deliberately rather than invented by whoever is building the link at the time.

Lowercase, Always

Analytics platforms treat Meta and meta as different sources. Enforce lowercase everywhere, use underscores rather than spaces, and avoid special characters entirely. This single convention prevents more reporting damage than any other rule in this guide.

Platform Templates

Each platform provides dynamic parameters that populate campaign, ad set, and ad names automatically. Using them means the tag is built once at the account level and never maintained by hand.

Google Ads

Set this as the account level tracking template, or as the final URL suffix if you prefer parameters visible in the URL.

utm_source=google
&utm_medium=paid_search
&utm_campaign={campaignid}
&utm_content={adgroupid}
&utm_term={keyword}
&gad_campaignid={campaignid}

For Shopping and Performance Max campaigns, change the medium:

utm_source=google
&utm_medium=paid_shopping
&utm_campaign={campaignid}
&utm_content={creative}

Google's ValueTrack parameters resolve at click time. Using IDs rather than names keeps the tag stable when someone renames a campaign, at the cost of readability. If you prefer readable reports, use {campaignname} and accept that renames will split your reporting.

Meta

Set at the ad level under URL parameters, or at the account level through the tracking template field.

utm_source=meta
&utm_medium=paid_social
&utm_campaign={{campaign.name}}
&utm_content={{ad.name}}
&utm_term={{adset.name}}

Meta's dynamic parameters use double braces. Because Meta populates these from the names you set, this template is only as useful as your naming convention, which is why a structured ad naming system pays for itself here specifically.

Note that Meta also appends fbclid automatically. Do not rely on it as your primary attribution mechanism, since it is on the parameter stripping lists that Apple and others maintain.

TikTok

utm_source=tiktok
&utm_medium=paid_social
&utm_campaign=__CAMPAIGN_NAME__
&utm_content=__AID_NAME__
&utm_term=__CID_NAME__

TikTok uses double underscore delimiters. Set this in the tracking URL field at ad level. TikTok campaign names frequently contain spaces and emoji, both of which break URLs, so enforcing clean naming in the ad account is a prerequisite rather than a nicety.

Pinterest

utm_source=pinterest
&utm_medium=paid_social
&utm_campaign={campaign_name}
&utm_content={ad_name}
&utm_term={adgroup_name}

Pinterest's organic and paid traffic both arrive with pinterest as the referrer, so the medium parameter is what separates them. Untagged paid Pinterest traffic is indistinguishable from organic Pinterest traffic, which makes tagging non optional here.

Microsoft Advertising

utm_source=microsoft
&utm_medium=paid_search
&utm_campaign={CampaignId}
&utm_content={AdGroupId}
&utm_term={keyword}

Microsoft's ValueTrack parameters mirror Google's closely, which makes migration straightforward. Use microsoft rather than bing as the source if you want consistency with the platform's current name, but pick one and never change it, because switching source values mid year splits your historical reporting.

Snapchat

utm_source=snapchat
&utm_medium=paid_social
&utm_campaign={{campaign.name}}
&utm_content={{ad.name}}
&utm_term={{adSquad.name}}

Snapchat's macros follow Meta's double brace convention. As with TikTok, campaign names need to be URL safe.

Channels Without Native Support

Several important sources have no dynamic parameter system, which means links are built by hand and consistency depends on process rather than configuration.

Influencer and creator links. Give each creator a fixed, documented link. Use utm_source for the platform, utm_medium=influencer, utm_campaign for the campaign, and utm_content for the individual creator. Pair it with a discount code, because a meaningful share of creator driven traffic arrives without ever clicking the link.

Podcast and offline. Use a short vanity URL that redirects to a tagged destination. Accept that the redirect will lose some attribution and back it up with a post purchase survey question.

QR codes. Encode a tagged URL directly. Since the visitor cannot see or edit the URL, this is one of the cleaner offline to online bridges available.

Partner and affiliate links. Specify the required parameters in the partner agreement. Partners will otherwise use their own conventions, and you will end up with six spellings of the same partner name.

The Rules That Keep It Working

  • Never tag internal links. A UTM on a link between two pages of your own site restarts the session and overwrites the original acquisition source. This is the single most damaging tagging mistake and it is common.
  • Never tag organic social posts as paid. Use utm_medium=social or organic_social to keep the distinction clean.
  • Never change a source value retroactively. Renaming bing to microsoft mid year splits your history into two channels.
  • Document the vocabulary somewhere shared. A UTM dictionary that everyone builds links from is what turns conventions into practice.
  • Audit monthly. Pull a list of distinct source and medium values from the last 30 days. Anything outside the controlled vocabulary is a tagging error that just happened.

The internal linking rule deserves emphasis because it is so counterintuitive. Marketers tag internal links to measure the performance of a banner or a navigation element, which is a reasonable thing to want. The side effect is that the original acquisition source is replaced, so a customer who arrived from a paid social ad and then clicked a tagged homepage banner is recorded as arriving from that banner. Use internal promotion parameters that your analytics is configured to ignore for attribution, or measure internal navigation through event tracking instead.

The monthly audit is the practice that separates brands with clean data from brands who believe they have clean data. Distinct value lists surface every mistake immediately: the campaign someone launched with utm_medium=CPC in uppercase, the influencer who built their own link, the agency that used a different source value for a new platform. Each of these is a two minute fix on the day it appears and a multi hour reconciliation six months later.

Summary

UTM tagging is the one part of measurement that is entirely within your control, and it determines whether your channel report is a description of reality or a pile of unattributed sessions. Use dynamic parameters at the account level on every platform that supports them, enforce lowercase values from a fixed vocabulary of nine or so mediums, and never let source values drift.

Start by setting the six templates above at account level, then handle the untagged channels through documented manual conventions and a discount code backstop for creator traffic. Then run the monthly distinct value audit, because tagging conventions decay continuously and the cost of catching a mistake is measured in minutes on the day it happens and hours a quarter later.

FAQ

Should I use campaign IDs or campaign names in my UTMs?
IDs are stable through renames but unreadable in reports. Names are readable but split your data whenever someone renames a campaign. Most teams use names and enforce a naming convention that discourages renaming, which gets both benefits provided the convention is actually followed.

Do I still need UTMs if the platform appends its own click identifier?
Yes. Click identifiers such as fbclid and gclid are on the parameter stripping lists maintained by Apple and other browser vendors, and they are only readable by the platform that set them. Standard UTM parameters are your own attribution mechanism and are more durable.

What is the right medium value for Performance Max or Advantage+ campaigns?
Pick based on where the inventory mostly sits and stay consistent. Many brands use paid_shopping for Performance Max and paid_social for Advantage+ shopping, then use the campaign parameter to identify the campaign type. Consistency matters more than the specific choice.

Why is so much of my paid traffic showing as direct?
Common causes are untagged links, parameters stripped by redirects between the ad click and the landing page, consent gated tracking that loses the landing URL before consent is granted, and in app browsers that drop parameters. Compare platform reported clicks against sessions carrying those parameters to size the gap.

Should organic social posts be tagged?
Yes, with a distinct medium such as organic_social, otherwise they land in referral or direct and become impossible to separate from paid activity on the same platform. Tag link in bio destinations in particular, since they carry meaningful volume.

#
Gaining Tracking Data

Decisions start with trust

14-days for free