How to Add URL Parameters for Accurate Campaign Tracking
You launched a campaign across email, Instagram, and Google Ads. The next morning, GA4 shows a flood of (direct) traffic and a few scattered sessions tagged Instagram. Sound familiar?
Here’s the thing. The campaign worked. The tracking didn’t.
I’ve audited dozens of GA4 setups and the root cause is almost always the same: URL parameters added incorrectly, inconsistently, or not at all. The fix is mechanical. Once you know the four rules of URL parameter syntax, you can tag any link in 30 seconds and stop losing attribution data.
In this guide, I’ll walk you through exactly how to add URL parameters to any link, what the syntax actually means, where to put parameters across channels, and how to test them before you push a campaign live.
What URL Parameters Are
URL parameters are key-value pairs appended to a URL after a question mark. They pass information to the destination server, analytics tool, or marketing platform without changing what the page displays. Format: ?key=value&key=value.
Here’s the anatomy of a tagged URL:
https://yourbrand.com/landing-page?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale_2026
Three things are happening:
https://yourbrand.com/landing-pageis the destination page.?starts the query string.utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale_2026is the query string, holding three URL parameters.
The page loads exactly the same way as the untagged version. The parameters are read by GA4 (or whichever analytics tool you use) and recorded against the session. That’s it. No code on the page is required.

The same syntax works for any parameter, not just UTMs. Email platforms, ad networks, and CRMs all use URL parameters to pass data between systems.
Honest limitation: URL parameters are visible. Anyone who sees the link sees the campaign tag. That’s fine for marketing. It’s not fine for sensitive data. Never put email addresses, user IDs, or personal information in URL parameters.
The 5 UTM Parameters (Google’s Standard)
UTM parameters are the standardized URL parameters Google built for campaign tracking. There are exactly 5. Three are required for GA4 attribution. Two are optional.
| Parameter | Required | Purpose | Example value |
|---|---|---|---|
utm_source | Yes | Where the traffic comes from | facebook |
utm_medium | Yes | The marketing channel type | cpc |
utm_campaign | Yes | The specific campaign name | spring_sale_2026 |
utm_term | No | Paid search keyword | running_shoes |
utm_content | No | Differentiates ads or CTAs | header_button |
If you only have time to add three parameters, add utm_source, utm_medium, and utm_campaign. GA4’s Traffic Acquisition report uses those three for default attribution. The other two add depth, not core tracking.
A complete UTM-tagged URL looks like this:
https://yourbrand.com/?utm_source=newsletter&utm_medium=email&utm_campaign=q2_launch&utm_content=hero_cta
That single string tells GA4: a click came from your newsletter, through the email channel, as part of the Q2 launch campaign, on the hero CTA. Clean attribution from one line of text.
How Do I Add URL Parameters to a Link?
Adding URL parameters to any link is a four-step process. The same steps work for an email link, a Facebook ad URL, or a QR code destination.
Step 1: Start With the Destination URL
Take the page you want to send traffic to. Strip any existing parameters first to avoid duplicates.
https://yourbrand.com/spring-sale
Step 2: Add a Question Mark
The ? tells browsers and analytics tools that what follows is a query string, not part of the page path.
https://yourbrand.com/spring-sale?
Only one ? per URL. If the page already has parameters, skip to step 4 and use & instead.
Step 3: Add Your First Key-Value Pair
The format is key=value. No spaces around the =. No quotation marks. Lowercase for everything (GA4 is case-sensitive, more on this in the mistakes section).
https://yourbrand.com/spring-sale?utm_source=facebook
Step 4: Add More Parameters With &
Separate every additional parameter with a single &. Order doesn’t matter to GA4, but I keep mine consistent: source, medium, campaign, content, term.
https://yourbrand.com/spring-sale?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale_2026
That’s the full tag. Copy it, paste it into your ad URL, email link, or wherever you’re sharing.

For repeated tagging, save the structure as a template. Tools like linkutm’s UTM builder handle the syntax automatically and enforce lowercase, so you stop building URLs character by character.
Where Should I Place URL Parameters in the URL?
URL parameters always go after the path and before any fragment identifier (#). They never go in the middle of the path or after a hash anchor. Here’s the correct order:
protocol://domain.com/path?parameters#fragment
A few specific scenarios:
- Plain URL:
yourbrand.com/page?utm_source=email&utm_medium=newsletter - URL with existing parameters:
yourbrand.com/page?id=123&utm_source=email&utm_medium=newsletter. Use&to append, never?. - URL with anchor link:
yourbrand.com/page?utm_source=email&utm_medium=newsletter#pricing. Parameters go before#. Anything after#is stripped from the server request, so parameters placed after the fragment are lost. - URL on a 301 redirect: Most modern redirects preserve query strings. If your platform strips them, you lose attribution. Test the redirect before launching the campaign.
Honest limitation: Some apps and platforms strip parameters in their in-app browsers. Instagram and TikTok have been the worst offenders in my experience. The workaround is a link shortener that preserves UTMs through the redirect, or a tracking pixel on the destination page.
How to Add URL Parameters Across Channels
The syntax stays the same. What changes is where you paste the tagged URL.
Email Campaigns
Replace every clickable URL in the email body, header buttons, image links, and footer with a UTM-tagged version. Most email platforms (Mailchimp, Klaviyo, HubSpot) have a UTM auto-tag option. I prefer manual tagging for full control over the utm_campaign value.
Example for a Black Friday email:
https://yourbrand.com/black-friday?utm_source=newsletter&utm_medium=email&utm_campaign=black_friday_2026&utm_content=header_cta
Paid Ads (Google, Facebook, LinkedIn)
Paste the tagged URL into the ad’s destination field. Facebook Ads Manager and Google Ads have a “URL parameters” field separate from the destination URL. You can put everything in the destination, or split: domain in destination, parameters in the URL parameters field. Either works.
For Google Ads, use {keyword} as the utm_term value to dynamically insert the matched keyword:
https://yourbrand.com/?utm_source=google&utm_medium=cpc&utm_campaign=brand_search&utm_term={keyword}
Social Media Posts
Tag the link before pasting it into the post. Use channel-specific values for utm_source (instagram, twitter, linkedin) and keep utm_medium as social or organic_social.
https://yourbrand.com/blog/post?utm_source=linkedin&utm_medium=social&utm_campaign=q2_content_push
QR Codes and Print
Generate the QR code from a tagged URL, not the bare destination. Add utm_medium=qr and utm_source matching the surface (poster, flyer, business_card).
https://yourbrand.com/event?utm_source=trade_show_booth&utm_medium=qr&utm_campaign=q2_event_kit
SMS Campaigns
Shorten the tagged URL first. A full UTM string in a 160-character SMS eats the entire message. Use a branded short link that preserves the parameters during redirect.

URL Parameter Mistakes That Break GA4 Tracking
Five mistakes account for most attribution errors I see in audits.
1. Mixed Casing
GA4 is case-sensitive. utm_source=Facebook and utm_source=facebook are two different sources. Your report fragments. The fix: always lowercase.
Wrong:? utm_source=Facebook&utm_medium=Email
Right:? utm_source=facebook&utm_medium=email
2. Spaces in Values
Spaces break URLs or get encoded as%20, which makes the value ugly in GA4. Use underscores or hyphens instead.
Wrong:? utm_campaign=spring sale 2026
Right:? utm_campaign=spring_sale_2026
3. Multiple Question Marks
Only one ? is allowed per URL. Everything after the first ? is the query string. A second ? breaks the parameter parser.
Wrong:? utm_source=email? utm_medium=newsletter
Right:? utm_source=email&utm_medium=newsletter
4. Missing the Three Required Parameters
GA4 needs utm_source, utm_medium, and utm_campaign to attribute properly. Skip any one, and the click can fall into (direct) / (none).
Wrong:? utm_source=facebook
Right:? utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale
5. Inconsistent Naming Across the Team
One marketer uses utm_source=fb, another uses utm_source=facebook, a third uses utm_source=Facebook_ads. GA4 sees three different sources. The fix is a written naming convention every campaign follows. I keep ours in a Notion doc. The strictest fix is enforcing it through a tool. Templates in linkutm’s UTM builder save the source/medium values once, then the team picks from a dropdown.
Honest limitation: Naming conventions are easy to write and hard to maintain. Six months in, someone always invents a new utm_source value. Audit your GA4 source/medium list quarterly. Merge or rename anything inconsistent.
How Do I Test URL Parameters in GA4?
Test every tagged URL before you launch the campaign. Three checks take 5 minutes total and catch 95% of tagging errors.
Test 1: Click the Link
Paste the tagged URL into your browser. The page should load normally. If the URL strips parameters on redirect or shows a 404, your destination URL is wrong.
Test 2: Check GA4 DebugView
Open GA4. Navigate to Configure > DebugView. Enable debug mode on your browser (install the GA Debugger Chrome extension or append ? gtm_debug=1 to the URL). Click your tagged link. Within 30 seconds, the session appears in DebugView with the UTM values you set. If the source shows (not set), your parameters didn’t transmit.
Test 3: Real-Time Report Verification
Go to Reports > Realtime in GA4. Click your tagged link from a different browser or incognito window. Within a minute, the session shows up. Filter by First user source/medium. The values should match what you tagged.
If the parameters are missing, three things are usually wrong:
- The destination redirected and stripped the query string.
- The browser cached a previous untagged visit, attributing this one to the cached source.
- The tagged URL had a typo (a missing
&, an extra?).
Run all three tests on every channel before launching. Five minutes of testing saves you a week of corrupted attribution data.

Automating URL Parameter Creation
Manual URL tagging works for 5 links a month. Past that, the time cost compounds and error rates climb.
Three options scale better than manual.
- Google’s Campaign URL Builder (https://ga-dev-tools.google/campaign-url-builder/). Free. Fills in the five UTM fields and concatenates the tagged URL. Best for one-off tagging.
- Spreadsheet with formulas. A column per UTM parameter, a concatenate formula at the end. Works for teams that already manage campaigns in Sheets.
- Dedicated UTM management tool. Templates, validation, naming enforcement, team-level conventions. I built linkutm because the first two stopped scaling past 50 links a month per team.
Whichever route you pick, the goal is the same: remove human error from URL parameter creation, because every typo turns into a row in GA4 that nobody can attribute.
Honest limitation: Tools don’t fix bad strategy. If your team hasn’t decided what utm_medium should be for a podcast ad (organic? referral? podcast?), no builder will save you. Strategy first. Tools second.
URL Parameters and SEO
A common worry: do URL parameters hurt my SEO rankings? The short answer is no, not when used for campaign tracking.
Google’s official guidance (Search Central documentation, 2024) states that UTM parameters are crawled but ignored for ranking. The canonical URL of the page handles consolidation. As long as your destination page has a pointing to the clean (untagged) URL, search engines treat all tagged variants as the same page.
Two exceptions where URL parameters can hurt SEO:
- If parameters create infinite crawl loops (faceted navigation on e-commerce sites). UTM parameters don’t cause this. Filter parameters can.
- If the page has no canonical tag and search engines index every UTM variant separately. This fragments link equity and creates duplicate content.
Both are solvable with the canonical tag. UTM parameters by themselves are SEO-safe.
Frequently Asked Questions
How do I add URL parameters to a link?
Add a ? after the page URL, then key=value for the first parameter, then &key=value for each additional parameter. Example: yourbrand.com/page?utm_source=email&utm_medium=newsletter. Use lowercase, replace spaces with underscores, and keep parameter values consistent across your team.
What is the correct format for URL parameters?
The correct format is ? key=value for the first parameter and &key=value for each parameter after that. The ? introduces the query string. The = separates the parameter name from its value. The & separates multiple parameters. No spaces, no quotation marks, all lowercase.
Where do I put parameters in a URL?
URL parameters go after the page path and before any fragment identifier (#). The order is: protocol, domain, path, ?, parameters, #, fragment. Anything placed after the # is dropped from the server request and won’t be recorded by analytics tools.
Are URL parameters case sensitive?
Yes, URL parameters are case sensitive in Google Analytics 4. GA4 treats utm_source=Facebook and utm_source=facebook as two different sources. Always use lowercase to keep your reports consolidated. The parameter names (utm_source, utm_medium) are also typically lowercase by convention.
Do URL parameters affect SEO?
URL parameters do not affect SEO when used for campaign tracking, as long as the destination page has a canonical tag pointing to the clean URL. Google crawls UTM parameters but ignores them for ranking. Issues only arise on pages without canonical tags or when faceted navigation creates infinite parameter variations.
How do I test URL parameters?
Test in three steps: click the tagged URL in a browser to confirm it loads, check GA4 DebugView for the parameter values to appear in real time, and verify in GA4’s Realtime report from a clean session. All three should show your UTM values matching what you tagged. If any test fails, your parameters aren’t transmitting correctly.
Start Tagging Every Link
URL parameters are simple syntax. The hard part is consistency: every link, every channel, every team member, every campaign. Get the four rules right (? first, = between key and value, & between parameters, lowercase always), and your GA4 reports finally tell the truth about where traffic comes from.
Build your first tagged URL today: pick one campaign, pick one destination, write out the five UTM parameters, and test the link in GA4 before sharing it.
Want to skip the manual syntax work? linkutm’s UTM builder generates tagged URLs in seconds with lowercase enforcement and saved templates, so your team builds the exact same parameter structure every time.