Microdeck.tools 100% In-Browser

GA4 UTM Campaign & URL Query Parameter Builder

New

Construct consistent GA4-friendly `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, and `utm_content` tracking links while protecting `#hash` anchor positioning. Includes an interactive URL Query Inspector to view, edit, or strip tracking parameters from messy links.

100% In-Browser No Server Storage Instant Results
Tagged Tracking URL
https://microdeck.tools/tools/batch-ocr?ref=launch&utm_source=newsletter&utm_medium=email&utm_campaign=q4_launch&utm_content=hero_cta

URL Query Parameter Breakdown

Protocolhttps:
Hostmicrodeck.tools
Path/tools/batch-ocr
Hash—
Query KeyDecoded Value
reflaunch
utm_sourcenewsletter
utm_mediumemail
utm_campaignq4_launch
utm_contenthero_cta

Did this tool save you time? Help keep Microdeck free and maintained. Completely optional · From $3.

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

1

Enter your Destination URL (e.g., `https://microdeck.tools/tools/pdf-merge#faq`).

2

Fill in required GA4 fields (`utm_source`, `utm_medium`, `utm_campaign`) plus optional `utm_term`, `utm_content`, or `utm_id`.

3

Toggle `Force lowercase` and `Spaces -> underscores` to prevent dirty analytics fragmentation.

4

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

Input
Base: https://example.com/app#pricing | Source: LinkedIn | Medium: paid_social
Output
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

Input
https://shop.test/shoes?color=black&fbclid=IwAR3x9&utm_source=ig
Output
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:

Processed in This Tab

Your input text and files are processed locally without uploading payloads to a processing server.

No Tool Payload Logging

Microdeck does not log or store the files or inputs you paste into tool workspaces (normal static hosting/CDN requests still load page assets).

Tab Memory Lifecycle

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

Support Microdeck

Completely optional · From $3 · No account required

Choose an amount (USD):Selected:$5

Minimum support amount is $3 USD.

Completely optional · From $3 · Checkout opens on Gumroad.