Skip to content

fix: only append ugig_ref to internal redirect URLs#104

Open
Danieliushka wants to merge 1 commit intoprofullstack:masterfrom
Danieliushka:fix/95-external-url-tracking
Open

fix: only append ugig_ref to internal redirect URLs#104
Danieliushka wants to merge 1 commit intoprofullstack:masterfrom
Danieliushka:fix/95-external-url-tracking

Conversation

@Danieliushka
Copy link
Copy Markdown

Fixes #95

Only appends ugig_ref tracking param when redirecting to ugig.net internal URLs. External product_url destinations (e.g. Mercury) no longer receive the meaningless tracking parameter.

Changes

  • Check dest.origin matches app URL before appending ugig_ref
  • External redirects rely solely on aff_ref cookie for attribution

Before

GET /api/affiliates/click?ugig_ref=nullref-9fd38c
→ 307 Location: https://mercury.com/r/profullstack?ugig_ref=nullref-9fd38c  ← leaks tracking

After

GET /api/affiliates/click?ugig_ref=nullref-9fd38c
→ 307 Location: https://mercury.com/r/profullstack  ← clean external URL

🤖 Generated with Claude Code

Fixes profullstack#95

Only appends ugig_ref param when redirecting to ugig.net internal URLs.
External product_url destinations (e.g. Mercury) no longer get the
meaningless tracking param. External redirects rely solely on the
aff_ref cookie for attribution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

bug: ugig_ref tracking param appended to external product URLs

1 participant