How It Works Under the Hood
The builder uses the native WHATWG `URL` and `URLSearchParams` APIs to normalize base URLs, safely encode query keys/values (`encodeURIComponent`), enforce optional lowercase standardization (`Force Lowercase` avoids split `Facebook` vs `facebook` buckets in GA4), and preserve trailing `#fragment` anchors correctly after the query string.
Step-by-Step Instructions
Enter your Destination URL (e.g., `https://microdeck.tools/tools/pdf-merge#faq`).
Fill in required GA4 fields (`utm_source`, `utm_medium`, `utm_campaign`) plus optional `utm_term`, `utm_content`, or `utm_id`.
Toggle `Force lowercase` and `Spaces -> underscores` to prevent dirty analytics fragmentation.
Or switch to URL Query Inspector to paste any long tracking URL, view every decoded query parameter row-by-row, strip ad tags (`fbclid`, `gclid`, `utm_*`), and copy the clean URL.
Key Features & Performance
- Properly places `?utm_...` BEFORE `#fragment` anchors (a common manual typo that breaks UTM tracking)
- Lowercase & whitespace normalization rules aligned with Google Analytics 4 channel grouping
- Interactive URL Query Inspector lists and edits arbitrary custom query keys safely
- One-click Strip Ad Trackers removes `utm_*`, `fbclid`, `gclid`, and `mc_cid` cleanly
- 100% private — never shares unpublished campaign launch URLs or promo slugs with external link trackers
Methodology, Formulas & Technical Standards
Using `new URL(rawUrl)` guarantees query mutations rewrite `url.searchParams` while leaving `url.hash` strictly at the end (`scheme://host/path?query#hash` per RFC 3986). Invalid schemes missing `https://` receive helpful validation hints rather than silently mangling strings.
Common Real-World Use Cases
- Tagging upcoming product-launch email newsletters (`utm_source=newsletter&utm_medium=email`) without leaking launch URLs online
- Checking why `#pricing` anchor links broke after someone manually appended `?utm_source=...` behind the hash
- Cleaning bloated Amazon, LinkedIn, or Meta ad URLs into clean shareable links
- Auditing callback OAuth redirect URLs with multiple nested encoded parameters
Worked Examples & Edge Cases
Preserving #pricing Hash Anchor
Base: https://example.com/app#pricing | Source: LinkedIn | Medium: paid_social
https://example.com/app?utm_source=linkedin&utm_medium=paid_social#pricing
Notice `?utm_...` precedes `#pricing` and `LinkedIn` normalizes to `linkedin`.
Cleaning Bloated Tracking Link
https://shop.test/shoes?color=black&fbclid=IwAR3x9&utm_source=ig
https://shop.test/shoes?color=black
Strip Tracking Params deletes `fbclid` and `utm_*` while preserving functional `color=black`.
Limitations, Scope & Accuracy Notes
- • URL length limits differ across legacy email clients/browsers (~2,000 characters is a safe practical ceiling for campaign links).
- • Does not generate shortened `bit.ly`-style domains since link shorteners require server-side redirect hosting.
Local Browser Processing & Privacy
Traditional web converters upload your documents, snippets, or media files to remote servers. GA4 UTM Campaign & URL Query Parameter Builder runs inside your browser tab:
Your input text and files are processed locally without uploading payloads to a processing server.
Microdeck does not log or store the files or inputs you paste into tool workspaces (normal static hosting/CDN requests still load page assets).
Working outputs stay in your browser tab and are released when you reset the tool or close the tab.
Frequently Asked Questions
Why does appending `?utm_source=...` AFTER `#section` fail in Google Analytics?
Browsers treat everything after `#` as a client-side fragment and do not send it in query search parameters cleanly, or analytics scripts ignore parameters placed inside the hash. Queries must always come before `#`.
Why should UTM tags almost always be lowercase?
GA4 is case-sensitive: `utm_source=Newsletter` and `utm_source=newsletter` split into two separate rows in reports.
Does Strip Tracking Params delete functional query keys like `?page=2` or `?q=shoes`?
No. The quick-strip button targets known attribution parameters (`utm_*`, `gclid`, `fbclid`, `msclkid`, `mc_eid`, `igshid`), and you can delete individual keys manually in the Inspector.
Are unpublished promo URLs saved anywhere?
Never. Everything stays inside your browser tab memory.
Explore Related Micro-Tools
Open Graph & Social SERP Previewer
Simulate link previews across Google, Twitter/X, Discord, Slack, Facebook & iMessage
Break-Even ROAS & Ad Spend CPA Calculator
Find exact break-even ROAS, max allowable CPA & simulated net profit after ads
Base64, URL & Hex Multi-Format Encoder/Decoder
Auto-detecting multi-codec converter for Base64, URL percent-encoding, Hex & HTML