fix(site): repair LinkedIn share URL + add UTM to share buttons - #1020
Open
DhruvSingh0905 wants to merge 1 commit into
Open
fix(site): repair LinkedIn share URL + add UTM to share buttons#1020DhruvSingh0905 wants to merge 1 commit into
DhruvSingh0905 wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rcjasub
approved these changes
Jul 17, 2026
rcjasub
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.com/feed?shareActive&mini=true, which is not a valid share endpoint and did not reliably open a prefilled share dialog. Switched to the documentedlinkedin.com/sharing/share-offsite/?url=endpoint.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
window.openand asserts the exact URL each button opens.bun validatepasses (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