Skip to content

feat(ads): rotate real campaigns on a slotless /api/ads/motd - #162

Merged
ralyodio merged 1 commit into
masterfrom
feat/ads-default-slot
Jul 30, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/ads-default-slot

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

curl https://crawlproof.com/api/ads/motd with no ?slot= could only ever return the house ad. Serving requires a slot — the impression row is what a later click resolves back to — so a slotless request had nothing to meter against and fell straight through to houseFill.

Adds ADS_DEFAULT_SLOT_ID: the slot credited when a serving request names none. Anonymous terminal traffic is the network's own inventory, so it points at CrawlProof's own publisher slot, and the bare URL now rotates real campaigns (bid-weighted lottery, so a different ad on each load). Unset, behaviour is unchanged.

Note this means clicks from the bare URL are billed to the advertiser and credited to the default slot, exactly like any other placement.

🤖 Generated with Claude Code

A bare `curl https://crawlproof.com/api/ads/motd` could only ever return
the house ad: serving needs a slot, because the impression row is what a
later click resolves back to, so no slot meant no paid fill.

Add ADS_DEFAULT_SLOT_ID — the slot credited when a request names none.
Anonymous terminal traffic is the network's own inventory, so it points at
CrawlProof's own publisher slot, and the endpoint now rotates real
campaigns on every load. Unset, behaviour is unchanged (house ad).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 108b667 into master Jul 30, 2026
@ralyodio
ralyodio deleted the feat/ads-default-slot branch July 30, 2026 09:43
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

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