utm_id

utm_id is the UTM parameter that assigns a unique campaign ID to a tagged URL so Google Analytics 4 can join the click to imported ad cost data. It is the sixth UTM parameter and the only one Google added after the original five Urchin tags. The value is stored in GA4’s “Session campaign ID” dimension and is the field GA4 uses to match sessions to the spend rows uploaded through cost data import.
A tagged URL with utm_id looks like this:
https://example.com/?utm_source=bing&utm_medium=cpc&utm_campaign=spring_sale_2026&utm_id=ms_12345
Here, ms_12345 is the campaign ID. The same value appears in the Microsoft Ads cost data file imported into GA4, which is how GA4 ties the session to its spend.
Why utm_id Matters
utm_id is the key that lets GA4 calculate ROAS, CPC, and other cost-based metrics for non-Google ad campaigns. Without it, you can see clicks and conversions in GA4 but cannot tie those numbers to spend without exporting and merging the data outside the platform.
GA4’s cost data import (Admin → Data import → Cost data) requires a Campaign ID column in the uploaded CSV. When a session arrives with a matching utm_id value in the URL, GA4 joins the two records. That join is what produces unified ROAS reports across Google and non-Google ad platforms inside GA4.
utm_id vs utm_campaign
This is the most common confusion. The two parameters are not interchangeable.
| Parameter | What it represents | Example value |
|---|---|---|
| utm_campaign | The human-readable campaign name | spring_sale_2026 |
| utm_id | The unique campaign ID for data joins | 12345678 or ms_spring_2026_001 |
utm_campaign answers “what initiative does this click belong to?”. utm_id answers “which row in the cost data file does this click match?”. Both can appear in the same URL, and each is stored in a separate GA4 dimension.
utm_id Format and Values
There is no required format, but common patterns are:
- Numeric IDs from ad platforms. Google Ads campaign IDs are 10-digit numbers like
12345678901. Reusing these values inside utm_id keeps IDs consistent across systems. - Custom alphanumeric codes.
ms_winter_2026_001orli_brand_terms_q1make the value readable while keeping it unique. - UUIDs. Some teams generate UUIDs like
a3f9c7e1-0b9d-4ee6-b27a-9d3a8f5c2b41for guaranteed global uniqueness.
The format does not matter to GA4. What matters is that the exact same value appears in both the URL and the cost data row you want it to match.
When to Use utm_id
utm_id is built for cost reporting, not general campaign tagging. The standard cases are:
- GA4 cost data import. Required for any campaign whose spend you upload via Admin → Data import → Cost data.
- Cross-platform attribution. When tagging non-Google ad campaigns (Microsoft Ads, LinkedIn Ads, TikTok Ads) and you want unified spend reporting in GA4.
- Search Ads 360, Campaign Manager 360, Display & Video 360. These Google Marketing Platform tools auto-tag with utm_id values that GA4 reads directly.
- Internal campaign IDs. When your team uses a campaign ID from a CRM or project tracker and wants that ID visible inside GA4.
For organic email, social, or content campaigns without cost data, utm_id adds no value. Stick to utm_source, utm_medium, and utm_campaign.
Dynamic utm_id Insertion
Most paid platforms can auto-populate utm_id at click time using a placeholder. The syntax varies by platform:
- Microsoft Ads:
utm_id={CampaignId} - Google Ads (final URL suffix):
utm_id={campaignid} - LinkedIn Ads:
utm_id={CAMPAIGN_ID} - Meta Ads:
utm_id={{campaign.id}}
A dynamic Microsoft Ads URL looks like this:
https://example.com/?utm_source=bing&utm_medium=cpc&utm_campaign=spring_sale_2026&utm_id={CampaignId}
At click time, Microsoft Ads replaces {CampaignId} with the actual campaign ID, and GA4 records the value in the Session campaign ID dimension.
utm_id Best Practices
- Match IDs to your cost data source. If you import Microsoft Ads cost into GA4, use the Microsoft Ads campaign ID inside utm_id. Mismatched IDs break the join.
- Use dynamic insertion when available. Hard-coding utm_id defeats the point. Let the platform inject the campaign ID at click time.
- Keep utm_id and utm_campaign separate. Put the ID in utm_id and the readable name in utm_campaign. Collapsing both into one field breaks both reports.
- Skip it when not importing cost data. utm_id is noise on email links, organic social posts, and partner referral URLs.
- Use consistent casing. GA4 treats
utm_id=ABC123andutm_id=abc123as two different campaign IDs.
Build tagged campaign URLs with consistent utm_id values using the free UTM builder at linkutm.
Frequently Asked Questions
What is utm_id used for?
utm_id assigns a unique campaign ID to a tagged URL so GA4 can join the click to imported ad cost data. It is required for GA4’s cost data import feature and shows up in reports as the “Session campaign ID” dimension. Without utm_id, GA4 cannot tie spend from non-Google ad platforms to its session data.
Is utm_id the same as utm_campaign?
No. utm_campaign is the human-readable campaign name (spring_sale_2026). utm_id is the unique campaign ID used to match the click to a row in your cost data file (12345678 or ms_spring_q1). Both can appear in the same URL, and each is stored in a separate GA4 dimension.
How do I find utm_id in GA4?
Open Reports, then Acquisition, then Traffic acquisition. Add “Session campaign ID” as a secondary dimension. GA4 splits each row by the utm_id value passed in the URL alongside the corresponding utm_campaign name.
Is utm_id required?
No. utm_id is optional, like utm_term and utm_content. Only utm_source, utm_medium, and utm_campaign are required for GA4 campaign attribution. Use utm_id specifically when you need cost data import or cross-platform spend reporting in GA4.
What format should utm_id values use?
Use whatever format matches the campaign ID in your cost data file. Most teams use either the numeric campaign ID from the ad platform (Microsoft Ads, LinkedIn Ads) or a custom alphanumeric code (ms_spring_2026_001). Stay consistent so each utm_id maps to exactly one row in the cost data CSV.