pyr0ball created pull request Circuit-Forge/snipe#20

pyr0ball
Fri, 03 Apr 2026 22:40:42 -0700

20#feat: eBay affiliate link builder#

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