Skip to content
Back to the journal

Share your story

Tag a recap link while preserving its destination

Build a campaign URL without losing an existing query or fragment; inspect duplicate parameters, private values and the actual destination separately.

The short answer

Choose a public destination and a consistent source, medium, campaign and optional content label. Add them as URL query parameters while preserving existing required parameters and the fragment. A tagged link labels a URL; it does not install analytics, establish consent, prove a visit or make a private report safe to share.

What you’ll take away

  • Check the complete destination before adding labels.
  • Preserve existing query parameters and the fragment.
  • Link construction, destination access and measurement are separate checks.

Decide what this link is allowed to expose

Begin with the actual intended public page, not a copied account screen or an unreviewed private report link. Inspect its query for access tokens, email addresses, signed credentials or other private values. A campaign name is not a place for a customer identity. Keep examples and public labels generic.

Changing query parameters can break a signed URL or access control. If the destination is private or its required parameters are unclear, keep it out of a public post and resolve the sharing route first. Adding utm_source never changes the underlying permission model.

Use one small naming vocabulary

Google’s current campaign documentation describes source, medium, campaign and content parameters and distinguishes capitalization. For this original exercise use linkedin, social, year-review-2026 and profile-post. Record those chosen labels before producing several links so later comparisons do not split the same intended category.

Content can distinguish a profile post from another placement; it is not evidence that a particular person clicked. Avoid changing names midway through a comparison without recording the change. A readable convention is useful even when your measurement system is not Google Analytics.

Preserve every URL component in the worked example

The constructed base is https://example.invalid/recap?view=full#notes. The complete output appears in link-tags.json. It retains view=full, adds the four utm query parameters before #notes, and keeps the notes fragment. The reserved example host is never requested by the checker.

Use a URL parser and set each intended parameter rather than concatenating a second question mark or placing the query after the fragment. URLSearchParams.set replaces existing occurrences of the exact matching key. Different capitalization is a separate key, so inspect mixed-case leftovers rather than assuming they disappeared.

Check replacements and encoding explicitly

The second fixture begins with two utm_source values. Setting the exact lowercase key once leaves one linkedin value and preserves view=full and #notes. The local checker verifies all three properties. This demonstrates component handling; it does not decide whether overwriting an earlier campaign label is appropriate for your real link.

Spaces and non-ASCII values may be encoded in a serialized URL. Read the parsed values as well as the final string. Do not decode a whole URL and paste it back unexamined, because reserved characters can change meaning. If existing signed or application-specific parameters are sensitive to serialization, use the supported sharing route instead.

Inspect the destination before interpreting a report

Copy the final complete URL into your private review record. For your real authorized destination, check that navigation still reaches the intended public content, required query behavior and relevant fragment. Inspect a redirect chain when it changes the URL; a successful first response alone does not establish that tags survive to measurement.

Then check your actual analytics configuration, collection conditions and reporting dimensions separately. A local tagged string can pass every construction check while producing no recorded session. Never treat a QA visit as a real reader, or a URL label as a payment receipt.

Run the example and finish the record

Unzip the working packet and run node reproduce-examples.mjs with Node.js 22 or newer already installed. It checks component preservation and rejects relative, non-HTTPS and credential-bearing fixture URLs without making a network request. These are deliberately narrow exercise rules, not a general URL security validator.

Finish the blank link record with the original destination, chosen labels, final URL, destination status and measurement status. Keep unknowns explicit. Reuse the same public label vocabulary for future posts, and change the content label only when it represents a distinct placement you actually intend to compare.

Sources & product references

Product details reflect the publication date. External features and interfaces may change.

WRAPPED.LI

Your year has a story. Find yours.

Explore your available activity, see the people behind it, and choose what to share.

Create my recapStart with a free profile preview. Premium is optional.
Wrapped.li editorial

Product guidance from Wrapped.li. Numerical examples are illustrative, not customer results. LinkedIn is a separate company.