feat: eBay affiliate link builder #20

Merged
pyr0ball merged 3 commits from feature/affiliate-links into main 2026-04-04 19:16:34 -07:00
Owner

Summary

  • _affiliate_url() helper appends EPN params when EBAY_AFFILIATE_CAMPAIGN_ID is set
  • Clean /itm/ URLs by default — no tracking without explicit opt-in
  • affiliate_active flag in search response drives frontend disclosure
  • SearchView shows "Links may include an affiliate code" when active
  • .env.example documents the env var with EPN registration link

Design (Option B)

Self-hosted users get clean links unless they set their own campaign ID. CF cloud instance sets its own ID in compose.cloud.yml. Disclosed inline in results count bar.

Test plan

  • Without EBAY_AFFILIATE_CAMPAIGN_ID: listing URLs are clean /itm/<id>, no disclosure shown
  • With EBAY_AFFILIATE_CAMPAIGN_ID=test123: URLs include EPN params, disclosure appears in count bar
  • Params appended correctly when URL already has ? query string
  • Closes #19
## Summary - `_affiliate_url()` helper appends EPN params when `EBAY_AFFILIATE_CAMPAIGN_ID` is set - Clean `/itm/` URLs by default — no tracking without explicit opt-in - `affiliate_active` flag in search response drives frontend disclosure - SearchView shows "Links may include an affiliate code" when active - `.env.example` documents the env var with EPN registration link ## Design (Option B) Self-hosted users get clean links unless they set their own campaign ID. CF cloud instance sets its own ID in `compose.cloud.yml`. Disclosed inline in results count bar. ## Test plan - [ ] Without `EBAY_AFFILIATE_CAMPAIGN_ID`: listing URLs are clean `/itm/<id>`, no disclosure shown - [ ] With `EBAY_AFFILIATE_CAMPAIGN_ID=test123`: URLs include EPN params, disclosure appears in count bar - [ ] Params appended correctly when URL already has `?` query string - [ ] Closes #19
pyr0ball added 1 commit 2026-04-03 22:40:42 -07:00
- _affiliate_url() helper appends EPN params when EBAY_AFFILIATE_CAMPAIGN_ID set
- Clean /itm/ URLs by default (no affiliate tracking without explicit opt-in)
- affiliate_active flag in search response drives frontend disclosure
- SearchView shows 'Links may include an affiliate code' when active
- .env.example documents EBAY_AFFILIATE_CAMPAIGN_ID with EPN registration link
- Closes #19
pyr0ball added 2 commits 2026-04-04 19:15:55 -07:00
pyr0ball merged commit c5988a059d into main 2026-04-04 19:16:34 -07:00
Sign in to join this conversation.
No reviewers
No labels
backlog
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/snipe#20
No description provided.