Small SEO Tools

How to Check a Campaign URL for Duplicate UTM Parameters

A campaign link copied between teams can acquire a second utm_source while keeping the original one. Both values remain in the address, even if a quick check shows only one. Before replacing the link in an advertisement or partner message, identify the repeated keys and decide which campaign labels belong there.

This procedure audits an existing URL, rebuilds its supported campaign fields with the UTM Campaign URL Builder, and checks what changed. The coffee-kit promotion below is fictional; its example.com address is for practice.

Find the duplicate before choosing a replacement

Start with this deliberately inconsistent link:

https://example.com/brew-kit/?sku=starter&utm_source=oldsource&utm_source=other&utm_medium=Email&utm_campaign=Old&utm_content=footer#details

Read the query between ? and #. Separate its pairs at each &, then list the names to the left of =. There are two utm_source entries, one medium, one campaign and one content value. The unrelated sku=starter selects the product variant; retain it for this example.

Do not decide which source is correct from its position. Confirm the intended source with the campaign owner. This guide does not assume that every analytics system resolves repeated keys in the same way.

Optional JavaScript check

For a longer link, a developer can inspect all values for a key without visiting the destination:

const link = new URL("https://example.com/brew-kit/?utm_source=oldsource&utm_source=other");
link.searchParams.getAll("utm_source");

The result is ["oldsource", "other"]. MDN documents that getAll() returns all matching values. A single-value lookup can hide a repeat; inspecting the array does not predict attribution in Google Analytics. Also review inconsistent parameter-name capitalization separately.

Write down the intended values and their casing

Suppose the campaign owner confirms these replacement labels:

  • Source: partner-circular
  • Medium: email
  • Campaign: winter-brew-kit
  • Content: hero-link

Keep this small record beside the old URL. Google Analytics campaign URL guidance says values are case-sensitive and recommends consistent naming. Changing Email to email is a deliberate value change. Lowercasing future links does not retroactively rename historical reporting data.

Use an established convention when one exists. Automatically changing every campaign label during a repair could create a different naming problem.

Rebuild the supported UTM fields

  1. Paste the full original practice URL into Website URL.
  2. Enter Partner Circular as source, Email as medium and Winter Brew Kit as campaign name.
  3. Enter Hero Link as content. Leave term and campaign ID empty for this example.
  4. Keep Lowercase all parameter values and Replace spaces with hyphens checked.
  5. Select Build URL. Review the output and the parameter table before using Copy URL.

The expected result is:

https://example.com/brew-kit/?sku=starter&utm_source=partner-circular&utm_medium=email&utm_campaign=winter-brew-kit&utm_content=hero-link#details

For this input, the builder replaces five old UTM pairs and keeps one other pair. Its normalization settings apply to the new campaign field values, not to the existing product parameter.

Check for fields the rebuild removed

The builder removes existing query pairs whose literal names begin with utm_, ignoring capitalization, then adds the entered fields. It does not import the old values into the form. Leaving content empty removes the old utm_content=footer without adding a replacement.

Its six fields are source, medium, campaign, ID, term and content. A required utm_source_platform is removed too, with no form field to restore it. Use a workflow that supports every required tag when the campaign plan needs more fields. Encoded parameter names also need separate inspection; this builder is not a comprehensive URL validator.

Verify the actual link before distributing it

  • Count each intended UTM key again. Confirm one source, one medium, one campaign and the intended optional fields.
  • Compare the retained page parameters with the original. Open your real destination and check the product or page state.
  • Keep the fragment after the query. MDN explains that a fragment identifies part of a resource and is handled by the client; it is separate from the query.
  • Test the link placed in the actual message or advertisement. Inspect the final address after any redirects, then check measurement separately in your Analytics setup.

A rebuilt URL cannot install Analytics or confirm attribution. Save the approved labels and final link together. For new links, the newsletter UTM guide covers planning consistent placements; this audit helps catch repeats when those links are reused.