diff --git a/server.js b/server.js index 4be1410..91fa18c 100644 --- a/server.js +++ b/server.js @@ -2355,7 +2355,10 @@ const server = http.createServer(async (req, res) => { if (status.views >= status.target || status.claimed) return json(res, 200, { ad: null, status }); const type = String(u.searchParams.get('type') || 'banner'); // members never see (or earn from) their own campaigns in the viewer - const ad = await ads.serve(type === 'text' ? 'text' : 'banner', Object.assign({ excludeEmail: s.email }, viewerGeo(req), audiences.matcher(req))); + const want = type === 'text' ? 'text' : 'banner', vopts = Object.assign({ excludeEmail: s.email }, viewerGeo(req), audiences.matcher(req)); + // the type is a preference, not a filter: the viewer alternates banner/text, so with only one type live every + // second press said "no member ads" (tester, 2026-10-18). Fall back to the other type before saying none. + const ad = (await ads.serve(want, vopts)) || (await ads.serve(want === 'text' ? 'banner' : 'text', vopts)); if (!ad) return json(res, 200, { ad: null, status }); const token = crypto.randomBytes(16).toString('hex'); // the viewer tab frames the advertiser's REAL url (no click counted for a paid view)