Skip to content

fix(site): repair LinkedIn share URL + add UTM to share buttons - #1020

Open
DhruvSingh0905 wants to merge 1 commit into
mainfrom
fix/share-buttons
Open

fix(site): repair LinkedIn share URL + add UTM to share buttons#1020
DhruvSingh0905 wants to merge 1 commit into
mainfrom
fix/share-buttons

Conversation

@DhruvSingh0905

Copy link
Copy Markdown
Contributor

Summary

The article-page Share buttons (X / LinkedIn / Facebook / email) had a broken LinkedIn link and no attribution tracking. This fixes both.

What changed

  • LinkedIn button was broken — it pointed at linkedin.com/feed?shareActive&mini=true, which is not a valid share endpoint and did not reliably open a prefilled share dialog. Switched to the documented linkedin.com/sharing/share-offsite/?url= endpoint.
  • Added UTM tags — every share link (X, LinkedIn, email) now carries utm_source / utm_medium=social / utm_campaign=article-share, so social referrals from these buttons are attributable in analytics (feeds the metrics baseline work).

Testing

  • New unit test covers all four buttons: correct endpoints, UTM tags present, and Facebook clipboard-copy. Mocks window.open and asserts the exact URL each button opens.
  • bun validate passes (format, type-check, lint, tests, build).

Scope

Touches only share-article.tsx + its new test. No behavior change to Facebook (still copy-to-clipboard) or the button layout.

🤖 Generated with Claude Code

The LinkedIn share button pointed at linkedin.com/feed?shareActive, which
is not a valid share endpoint and did not reliably prefill. Switched to
the documented share-offsite endpoint. Also added utm_source/medium/
campaign to every share link (X, LinkedIn, email) so social referrals
are attributable in analytics.

Adds a unit test covering all four buttons (correct endpoints, UTM tags,
clipboard copy). Full validate passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
internal-dashboard Ready Ready Preview, Comment Jul 14, 2026 8:21pm
nightcrawler Ready Ready Preview, Comment Jul 14, 2026 8:21pm

@rcjasub rcjasub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LinkedIn fix is correct (uses the documented sharing/share-offsite/?url= endpoint), UTM tagging is safe (single-encoded, no injection risk), and no regressions — Facebook/layout untouched, tests (4/4) and tsc --noEmit pass locally.

Follow-up (non-blocking): Facebook's button still has no UTM tag, so its referrals won't be attributable like the other three.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants