Skip to content

Amazon is the parts programme we already have an account for, so wire that one - #11

Merged
ralyodio merged 1 commit into
mainfrom
worktree-amazon-parts
Sep 6, 2026
Merged

Amazon is the parts programme we already have an account for, so wire that one#11
ralyodio merged 1 commit into
mainfrom
worktree-amazon-parts

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Anthony has no eBay Partner Network, CJ or Rakuten account, and opening one needs a W-9. He does have Amazon Associates. So Amazon is the programme that can actually pay, and it sells more of what a VIN lookup sends people looking for — filters, sensors, brakes, trim — than the retail chains do.

Why it isn't just another AFFILIATE_LINKS template

CJ, Rakuten and eBay hand you a URL of theirs with the destination encoded inside it. Amazon wants its own URL with tag on it. Same goal, different shape, so the vendor row carries its own tagger rather than being bent into the template mechanism:

https://www.amazon.com/s?k=2021+JEEP+Grand+Cherokee&i=automotive&tag=<tag>&ascsubtag=nichedb-vin

A network template still wins if one is ever configured for the same vendor, so this doesn't paint us into a corner.

This is the shape sh1pt's affiliate-amazon-associates adapter already builds, ascsubtag included. That subtag is a reporting dimension rather than a second account, which matters here: the tag is shared with another property, and the subtag keeps this traffic separable in the Associates dashboard anyway. It's sanitised on the way in, because Amazon silently drops a subtag with punctuation in it.

i=automotive keeps a search for "2014 Honda Civic alternator" inside the Automotive store instead of returning a book about one.

No tag in code

AMAZON_ASSOCIATE_TAG is the env-var name the rest of the fleet already uses (nicheforge-wordpress/.env.example). There is deliberately no default in the source: no tag configured means no tag appended and nothing described as sponsored, because it wouldn't be. The deployment carries the value.

Disclosure

Amazon's Operating Agreement requires one sentence, in its words, wherever an Associates link appears. The disclosure now says it — and only when an Amazon link on that page is actually tagged:

Some of these links pay us a commission if you buy through them. It costs you nothing and it does not change which vendors are listed or their order. As an Amazon Associate I earn from qualifying purchases.

Also

?part= on the page, which the JSON endpoint already honoured and the page was dropping on the floor — the same way it used to drop the odometer reading.

Verified

  • 122 tests pass (4 new: tagged-in-place, subtag sanitising, no-tag-no-claim, and Amazon present in the vendor list), biome clean
  • Rendered in Chrome with AMAZON_ASSOCIATE_TAG=parklookup-20:
    • Amazon → www.amazon.com with tag=parklookup-20, ascsubtag=nichedb-vin, rel="sponsored nofollow noopener"
    • the other six → their own hosts, no tag, rel="nofollow noopener"
    • the Amazon sentence present in the disclosure
  • With no tag set, the Amazon link is plain and sponsored: false

🤖 Generated with Claude Code

https://claude.ai/code/session_012BzJdwiBGU9hmMGE5fBxjA

… that one

The three programmes the other vendors run (eBay Partner Network, CJ, Rakuten)
all need an account nobody here has and a W-9 to open one. Amazon Associates is
already open, so it is the one that can actually pay, and Amazon sells more of
what a VIN lookup sends people looking for — filters, sensors, brakes, trim —
than the retail chains do.

Amazon's link is not the shape the other networks use, which is why it is not
just another AFFILIATE_LINKS template. CJ, Rakuten and eBay hand you a URL of
theirs with the destination encoded inside it; Amazon wants its own URL with
`tag` on it. So the vendor row carries its own tagger, and a network template
still wins if one is ever configured for the same vendor. This is the shape
sh1pt's `affiliate-amazon-associates` adapter builds, including `ascsubtag`,
which is a reporting dimension rather than a second account: traffic from here
stays separable in the dashboard even though the tag is shared with another
property. A subtag is sanitised, because Amazon silently drops one with
punctuation in it.

`AMAZON_ASSOCIATE_TAG` is the name the rest of the fleet already uses, and there
is deliberately no default in code: no tag configured means no tag appended and
nothing described as sponsored, because it would not be. The deployment carries
the value.

Amazon's Operating Agreement requires one sentence, in its words, wherever an
Associates link appears, so the disclosure says it — and only when an Amazon
link on that page is actually tagged.

Also `?part=` on the page, which the JSON endpoint already honoured and the page
was dropping on the floor, the same way it used to drop the odometer reading.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012BzJdwiBGU9hmMGE5fBxjA
@ralyodio
ralyodio merged commit a4987a7 into main Sep 6, 2026
3 checks passed
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.

1 participant