feat: configurable eBay affiliate link builder #19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add optional eBay Partner Network (EPN) affiliate link generation to listing click-throughs.
Design (Option B)
EBAY_AFFILIATE_CAMPAIGN_IDto.env.example(optional, blank by default)/itm/URLs before returning them to the frontend/itm/<id>URLs (no tracking, no affiliate revenue)compose.cloud.ymlenv — users on managed instance generate revenue for CF, which is disclosed in the UIEPN URL format
The scraper already normalizes to
/itm/<id>— affiliate params are appended at response time, not stored.Files to change
api/main.py—_build_listing_url(item_id)helper, called in search response serialization.env.example— documentEBAY_AFFILIATE_CAMPAIGN_IDcompose.cloud.yml— set CF campaign ID for managed instanceapp/core/config.py(if snipe gets one) or read directly fromos.environDisclosure
The frontend should surface a one-line note when affiliate links are active: "Links may include an affiliate code." This satisfies the plain-language consent principle.
Duplicate of #16 — affiliate link builder is tracked there.