You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d29bbff
Browse filesBrowse the repository at this point in the historyBrowse files
Run ads where the subject is what people are asking about (#248)
Targeting on what chovy.com's SameBrain says founders are trying to build this
week, and the 90 days free that comes with turning it on.
Two halves have to agree before a campaign is preferred: its own subject has to
be trending AND the page being filled has to be about that subject. Either half
alone is how an ad network ends up putting a crypto ad on a recipe blog — one
is "this is in the news", the other is ordinary contextual targeting. The
page's subject is not new work: the autoblog already keeps a hand-checked
subject list per site (lx_site.master_keywords) and that is what is read.
It is a preference, not a rule. A match carries four times its own bid weight
into the same bid-weighted lottery, so it wins more fills and every other
eligible campaign still rotates — the auction's hard requirement.
The promo separates two questions that look like one. A campaign inside its
ninety days COMPETES for real placement (that is what premium delivery means;
parked in the backfill pool it would never serve at all next to a paying
advertiser) and BOOKS as tier='free', because nothing is charged. So no spend
and no publisher earnings are written for a payment that is not happening —
which matters most here, where one account owns both sides of nearly every fill
and a paid booking would read as revenue on the ROI dashboard. It is not
revenue. It is a discount we gave ourselves.
Billing at zero is settled in resolveClick rather than inside ad_charge_click:
that function is the hottest SQL in the product and its migrations are applied
by hand, so teaching it about promos would put a new failure mode in front of
every click on the network.
Degrading is the design everywhere it touches. A trend list older than 36 hours
stops steering delivery instead of targeting last week forever; a failed pull
leaves the stored list; a missing table or column — the migration is applied by
hand, so a deploy can lead it — reads as "nobody is trending", which is exactly
how serving behaved yesterday. On a network where nobody has opted in this
costs one cached query a minute and nothing per fill.
$0.02 CPC is stated once, in lib/ads/pricing.ts, and quoted from there by the
dashboard, the CLI and the promo row. Known gap recorded there: it is smaller
than one credit (5c), and nothing bills a fraction of a credit today, so after
a promo ends a trending campaign bills at its ordinary bid until sub-credit
metering exists.
The migration is added, not applied — apply it one file at a time.
SAMEBRAIN_URL and SAMEBRAIN_SECRET go in the vault and on the deployment, never
in a committed .env file.
Claude-Session: https://claude.ai/code/session_01QuUkTrofSjQ15j79mRuy4f
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments