Default house ad fallback (never-blank ad slots) - #89
Merged
Merged
Conversation
serveAd() returned null when a slot had no eligible/in-budget campaign, leaving publisher units blank. Now it falls back to a CrawlProof house ad so a slot is never empty: - lib/ads/house.ts: renders an image-based house ad from default AI-generated promo artwork (public/ads/house/*.webp) with an overlaid "Your ad here" pitch linking back to CrawlProof. Not metered or billed. - Wired into serveAd for both the no-creative and out-of-budget cases; invalid/ inactive slots and format mismatches still return null. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a slot has no eligible/in-budget campaign,
serveAdreturnednulland the publisher's unit rendered blank. This adds a default CrawlProof house ad so slots are never empty.lib/ads/house.ts— image-based house ad using default AI-generated promo artwork (public/ads/house/*.webp, ~8–10KB) with an overlaid "Your ad here — crypto PPC ads" pitch that links back to CrawlProof. Not metered or billed.serveAdfor both the no-creative and out-of-budget paths; invalid/inactive slots and format mismatches still return null (no ad).Only touches the ads module + two image assets.
🤖 Generated with Claude Code