Text ads get their own off-site rate (Marty 2026-11-12, same as InstantAdPay): Network Ad Space and partner-zone text views cost 1/synRateDivisorText (default 10, 1 credit = 100 network views) of the on-site rate; banners keep synRateDivisor 4. Going forward only. Admin Rates field, Ads screen + Campaigns table show 1/N per type, chatbot canned + prompt updated (KNOWLEDGE_DATE 2026-11-12). my.js/ads-screen.js/admin.js ?v=20261112txt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+9
-7
@@ -25,7 +25,7 @@ let DATA_DIR = null;
|
||||
let chain = null;
|
||||
const MODEL = process.env.OPENROUTER_MODEL || 'deepseek/deepseek-v4-flash:nitro';
|
||||
const CONTRACT = '0x26Bdc556b94399bEdd69ae3ACA5aA6c54D946e8b';
|
||||
const KNOWLEDGE_DATE = '2026-11-11'; // the day the CANNED answers and FACTS below were last checked against the site
|
||||
const KNOWLEDGE_DATE = '2026-11-12'; // the day the CANNED answers and FACTS below were last checked against the site
|
||||
|
||||
function init(opts) {
|
||||
if (opts && typeof opts.refuelOn === 'function') REFUEL_ON = opts.refuelOn; DATA_DIR = opts.dataDir; chain = opts.chain; return kb.init({ dataDir: DATA_DIR, seeds: seeds() }); }
|
||||
@@ -79,9 +79,9 @@ const CANNED = [
|
||||
{ id: 'qualification', title: 'Qualification: levels 2 and 3', q: ['How do I unlock level 2?', 'How does qualification work?', 'What is a pass-up?'], tags: ['qualification', 'level 2', 'level 3', 'pass-up'],
|
||||
re: /(qualif|unlock level|open level|level ?2|level ?3|pass.?up|two buyers|five buyers)/i,
|
||||
a: 'Level 1, half of every package your direct referrals buy, pays from their first qualifying purchase once your payouts are on. Level 2 (20 percent) opens after two of your people buy a qualifying package, $25 or larger. Level 3 (10 percent) opens after five. The $10 door package is for trying the ads and does not count toward opening levels. Until a level opens, its share passes up the line to the next qualified member, then to the platform, and it never comes back, so leaders qualify before their teams\' teams buy. Qualification is counted by the contract, never expires and cannot be bought.' },
|
||||
{ id: 'network-rate', title: 'Network and partner-zone views cost a quarter of the rate', q: ['Do network views use my credits?', 'Am I charged for views on other sites?', 'Why are network views cheaper?'], tags: ['network views', 'network ad space', 'syndication', 'zones', 'credits', 'rate'],
|
||||
{ id: 'network-rate', title: 'Network and partner-zone views cost less than views here', q: ['Do network views use my credits?', 'Am I charged for views on other sites?', 'Why are network views cheaper?'], tags: ['network views', 'network ad space', 'syndication', 'zones', 'credits', 'rate'],
|
||||
re: /((network (views?|ad space)|partner (network|sites?|zones?)|syndicat\w*|other (members'?|people'?s?) (zones?|sites?)|other sites?).{0,60}(credits?|charge[ds]?|cost|spend|balance|budget|free|pay|rate|cheap)|(credits?|charge[ds]?|cost|spend|balance|budget|pay|rate).{0,60}(network (views?|ad space)|partner (network|sites?|zones?)|syndicat\w*|other (members'?|people'?s?) (zones?|sites?)|other sites?))/i,
|
||||
a: 'Views here on LinkSpin use credits at the normal rate. Your banner and text ads also show on the partner ad network and in other members\' zones on their own sites, and those views cost a quarter of the rate: 4 of them cost what 1 view here does. So your budget goes further, and every credit still buys real views. The Ads screen shows them under each ad as network and partner zones views, marked at 1/4. Zone owners still earn their usual credits for showing your ad.' },
|
||||
a: 'Views here on LinkSpin use credits at the normal rate. Your banner and text ads also show on the partner ad network and in other members\' zones on their own sites, and those views cost less: for a banner, 4 of them cost what 1 view here does. Text ads go further still: since November 12, 10 network views of a text ad cost what 1 view here does. So your budget goes further, and every credit still buys real views. The Ads screen shows them under each ad as network and partner zones views, marked at 1/4 (banners) or 1/10 (text). Zone owners still earn their usual credits for showing your ad.' },
|
||||
{ id: 'zones', title: 'Ad zones on your own site', q: ['What is an ad zone?', 'How do I put ads on my website?', 'What sizes are the zones?'], tags: ['zones', 'publisher', 'embed', 'website'],
|
||||
re: /(what('s| is) (a |an )?(ad )?zone|zones?\b|embed|script tag|publisher|site owner|my (own )?(web)?site|ad slot|viewable)/i,
|
||||
a: 'A zone is an ad slot on your own site: one script tag, nine standard sizes (728x90, 468x60, 300x250, 336x280, 250x250, 125x125, 160x600, 120x600, 320x50). Each load shows a LinkSpin member campaign first, then a network ad, then our house banner if nothing paid fits. You earn ad credits per viewable impression (half the banner on screen for one second, bots never, 50 credited views per visitor per zone per day): 1 credit per 5 viewable member-ad views and 1 per 10 network-ad views, or 1 per 8 on a Verified zone the admin has reviewed. A new zone earns after its first 100 on-site views with at least 40 percent viewable, and paid ads serve only on the site you declared, so copying the tag elsewhere earns nothing. Everything is explained at ' + SITE_URL + '/publishers and you add zones under Zones in your Control Room.' },
|
||||
@@ -183,9 +183,11 @@ let REFUEL_ON = () => false;
|
||||
// NETWORK RATE (Marty, 2026-10-27, approved 4:1) follows ads rates().synRateDivisor; the canned answer quotes 1/4, so the fast
|
||||
// path rewrites it when the admin picks another N, and the AI fact always states the live N.
|
||||
const SYN_N = () => { try { return Math.max(1, Math.floor(Number(require('./ads').synRateDivisor()) || 1)); } catch (e) { return 4; } };
|
||||
// text ads have their own N since 2026-11-12 (Marty: 1/10); the canned answer quotes 4 and 10
|
||||
const SYN_T = () => { try { return Math.max(1, Math.floor(Number(require('./ads').synRateDivisorText()) || 1)); } catch (e) { return 10; } };
|
||||
const netRateAnswer = n => n === 1 ? 'Your banner and text ads also show on the partner ad network and in other members\' zones on their own sites, and those views use credits at the same rate as views here.'
|
||||
: 'Views here on LinkSpin use credits at the normal rate. Your banner and text ads also show on the partner ad network and in other members\' zones on their own sites, and those views cost 1/' + n + ' of the rate: ' + n + ' of them cost what 1 view here does. So your budget goes further, and every credit still buys real views. The Ads screen shows them under each ad as network and partner zones views, marked at 1/' + n + '. Zone owners still earn their usual credits for showing your ad.';
|
||||
function synFact() { const n = SYN_N(); return '- NETWORK RATE (live, Marty 2026-10-27): views ON LinkSpin are charged at the normal rate. Banner/text views on the partner ad network (Network Ad Space) and member campaigns shown in OTHER members\' zones on their own sites cost 1/' + n + ' of the on-site rate (' + n + ' of them = the price of 1 view here). The budget is the limit, burns follow what was charged, nothing charged before 2026-10-27 changed. Zone owners still earn their usual zone credits.' + String.fromCharCode(10); }
|
||||
: 'Views here on LinkSpin use credits at the normal rate. Your banner and text ads also show on the partner ad network and in other members\' zones on their own sites, and those views cost 1/' + n + ' of the rate: ' + n + ' of them cost what 1 view here does.' + (SYN_T() !== n ? ' Text ads: ' + SYN_T() + ' network views cost what 1 view here does.' : '') + ' So your budget goes further, and every credit still buys real views. The Ads screen shows them under each ad as network and partner zones views, marked at 1/' + n + '. Zone owners still earn their usual credits for showing your ad.';
|
||||
function synFact() { const n = SYN_N(); return '- NETWORK RATE (live, Marty 2026-10-27): views ON LinkSpin are charged at the normal rate. Banner/text views on the partner ad network (Network Ad Space) and member campaigns shown in OTHER members\' zones on their own sites cost 1/' + n + ' of the on-site rate (' + n + ' of them = the price of 1 view here); TEXT ads have their own off-site rate since 2026-11-12 (Marty): 1/' + SYN_T() + ' of the on-site text rate (' + SYN_T() + ' views = the price of 1 view here), going forward only. The budget is the limit, burns follow what was charged, nothing charged before 2026-10-27 changed. Zone owners still earn their usual zone credits.' + String.fromCharCode(10); }
|
||||
function refuelFact() { return REFUEL_ON() ? "- MONTHLY REFUEL STREAK (built 2026-10-24, switch refuelStreak): ONE streak per member across InstantAdPay and LinkSpin. Counted refuel = a NEW package of $20+ on InstantAdPay or $25+ on LinkSpin by one of the member's own positions. First one sets the member's own refuel day; next due 30 days after the last counted refuel; window opens 5 days before the due day; 5-day grace after it; Central time. Missing the grace resets the streak, except one free miss per 365 days. Bonus (purchased-grade ad credits on the site where bought, credit log 'Refuel streak'): one engine m1 +10%, m2 +15%, m3 +20%, m4+ +25%; both sites in the same cycle m1 +15%, m2 +20%, m3 +30%, m4+ +40% each (first site topped up to the both rate, difference only) plus a 100-credit Featured bonus on InstantAdPay at m4+ (purchased-grade credits, any format). Stacks on Five Dollar Friday / Wired Wednesday. Pit Stop: another $20+/$25+ package on a site already refueled this cycle, before the next window opens (the other site's first package in the cycle is the second engine instead) = half the current streak rate, once per site per cycle, not a counted refuel. Badges: Engine Started (first refuel), Refueled 3 / 6 / 12 months. ENGINE ROOM: unlocked by the first counted refuel (greyed 'Refuel to start your engine' before), IAP tab Engine Room + LinkSpin Ads screen panel, same data both sites: dials Fuel left (credits free + in campaigns on both sites vs this cycle's refuel credits incl. bonus, days left at the recent burn), Clicks this week (vs last week, clicks per 1,000 credits), Goals this month (conversion pixel conversions since the 1st Central vs the member's own goal); streak panel; warning lights (ads at 80%, ads out, refuel day coming, login slot open); six part lights (fuel, banner spin, spin link, page, testing, conversion tracking: green working, amber needs attention, grey not started with a Set it up link); one Next move button from simple rules. REFUEL KIT: each counted refuel unlocks the Central-month's members-only banner set for this site's own program (5 sizes, personalized server-side with @username + QR to the member's link; IAP: Promo tools card with Use in an IAP banner campaign; LinkSpin: Ads screen card with Load into my Banner Spin); kits stay usable after the month; streak month 3+ adds an animated GIF, month 6+ a BannerKitAI custom-banners credit (coming, entitlement saved). Reminders 5 days before, on the day, last call at the end of grace (email + on-site notice). The member's Refuel card (InstantAdPay Overview, LinkSpin Credits/Ads) shows refuel day, streak, next bonus, Pit Stop status. Either site alone keeps the streak (one-engine rates); both sites in one cycle = the bigger bonus; never say both are required. MEMBER GUIDE PAGE (public, 2026-10-24): /refuel on both sites (https://instantadpay.com/refuel and https://linkspin.app/refuel): the flow, the numbers, the member steps, leader coaching and FAQ; point members there for the full picture. Ad credits only, never cash; never promise income. No auto-billing: the member chooses every package. ROUTES (2026-10-25): LinkSpin menu item Refuel = https://linkspin.app/credits#refuel (the Refuel panel, scrolled to and highlighted); packages of $25+ there are marked counts for Refuel; https://linkspin.app/credits#buy = the package picker; https://linkspin.app/ads#engine = LinkSpin Engine Room. InstantAdPay Engine Room = https://instantadpay.com/my#engine; its Set up conversion tracking opens https://instantadpay.com/my#conversions (Campaigns > Conversion tracking card, same goals LinkSpin counts). Engine Room links that cross to LinkSpin (Banner Spin, spin link, page, testing, refuel LinkSpin) open LinkSpin with a note at the top naming the job, Step 1, a guide link and Back to InstantAdPay; same email signs in on both.\n" : '- MONTHLY REFUEL STREAK: built but NOT switched on yet. If asked, say it is coming and nothing counts toward it today; do not quote bonus rates or dates.\n'; }
|
||||
const REFUEL_OFF_ANSWER = 'The Monthly Refuel streak (bonus ad credits for refueling every month, more when you refuel both InstantAdPay and LinkSpin) is built but not switched on yet, so nothing counts toward it today. The bonuses running now are Five Dollar Friday and Wired Wednesday on InstantAdPay. When the streak goes live, your Refuel card will show your refuel day.';
|
||||
// launch day 2026-11-15 Central: before it the pre-launch fact, from it the launched fact (date-driven since 2026-11-02)
|
||||
@@ -275,9 +277,9 @@ async function answerRaw(message, historyText) {
|
||||
let hit = null, kbOk = true;
|
||||
try { hit = await kb.fastPath(msg); } catch (e) { kbOk = false; console.error('kb fast path', e.message); }
|
||||
if (hit && hit.id === 'refuel' && !REFUEL_ON()) return { reply: REFUEL_OFF_ANSWER, canned: true, kb: hit.id };
|
||||
if (hit && (hit.id === 'network-rate' || hit.id === 'c-network-rate') && SYN_N() !== 4) return { reply: netRateAnswer(SYN_N()), canned: true, kb: hit.id };
|
||||
if (hit && (hit.id === 'network-rate' || hit.id === 'c-network-rate') && (SYN_N() !== 4 || SYN_T() !== 10)) return { reply: netRateAnswer(SYN_N()), canned: true, kb: hit.id };
|
||||
if (hit) return Object.assign({ reply: hit.answer, canned: true, kb: hit.id }, hit.handoff ? { handoff: true } : {});
|
||||
if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'network-rate' && SYN_N() !== 4 ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {});
|
||||
if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'network-rate' && (SYN_N() !== 4 || SYN_T() !== 10) ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {});
|
||||
// retrieval: the closest entries ride along in the system prompt (a short follow-up borrows words from the chat so far)
|
||||
let kbBlock = '', kbIds = [];
|
||||
try {
|
||||
|
||||
+1
-1
@@ -550,6 +550,6 @@
|
||||
|
||||
<script src="/assets/common.js?v=20261107tg"></script>
|
||||
<script src="/assets/admin-kb.js?v=20261020kb"></script>
|
||||
<script src="/assets/admin.js?v=20261107tg"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-refill.js?v=20261024rf"></script><script src="/assets/admin-kits.js?v=20261024kit"></script><script src="/assets/admin-launchweek.js?v=20261105lw"></script>
|
||||
<script src="/assets/admin.js?v=20261112txt"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-refill.js?v=20261024rf"></script><script src="/assets/admin-kits.js?v=20261024kit"></script><script src="/assets/admin-launchweek.js?v=20261105lw"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261111tank"></script>
|
||||
<script src="/assets/ads-screen.js?v=20261104lf"></script>
|
||||
<script src="/assets/ads-screen.js?v=20261112txt"></script>
|
||||
<script src="/assets/fuel.js?v=20261025ff"></script>
|
||||
<script src="/assets/engine-room.js?v=20261101t"></script>
|
||||
</body>
|
||||
|
||||
@@ -1038,7 +1038,8 @@
|
||||
loginCreditsPerDay: ['Login ad: legacy credits per day', 'only for old login ads with no end date (none since slots)'],
|
||||
loginDwellSeconds: ['Login ad: seconds shown', 'full-screen interstitial after sign-in'],
|
||||
burnBatchMin: ['On-chain burn batch (credits)', 'accrued spend is burned once it reaches this'],
|
||||
synRateDivisor: ['Network rate divisor (N)', 'partner-network (NAS) views and member ads in other members zones cost 1/N of the on-site rate; 1 = same rate; whole numbers'],
|
||||
synRateDivisor: ['Network rate divisor (N)', 'partner-network (NAS) banner views and member banners in other members zones cost 1/N of the on-site rate; 1 = same rate; whole numbers'],
|
||||
synRateDivisorText: ['Network rate divisor for TEXT ads (N)', 'off-site text-ad views cost 1/N of the on-site text rate (10 = 1 credit per 100 network views); whole numbers'],
|
||||
welcomeCredits: ['Welcome credits', 'granted after the welcome tour'],
|
||||
dailyViewTarget: ['Daily view set (ads)', 'ads a member views for the daily claim'],
|
||||
dailyClaimCredits: ['Daily claim (credits)', 'paid when the set is complete'],
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
const cs = D.campaigns || []; const live = cs.filter(c => c.status === 'active');
|
||||
{ const sel = $('fAud'); if (sel) { const keep = sel.value; sel.innerHTML = '<option value="">Everyone</option>' + (D.audiences || []).map(a => '<option value="' + a.id + '">' + esc(a.name) + ' (' + fmt(a.size30) + ')</option>').join(''); sel.value = keep; sel.onchange = () => { $('fAudModeRow').hidden = !sel.value; }; } }
|
||||
const views = cs.reduce((n, c) => n + (c.imps || 0) + (c.impsNas || 0) + (c.impsSyn || 0), 0);
|
||||
const synN = Math.max(1, Math.floor(Number(D.rates && D.rates.synRateDivisor) || 1)); // network rate (Marty, 2026-10-27, 4:1)
|
||||
const offTxt = c => (c.impsNas ? '<br><span class="muted" style="font-size:11px">+' + fmt(c.impsNas) + ' network' + (synN > 1 ? ' at 1/' + synN : '') + '</span>' : '')
|
||||
+ (c.impsSyn ? '<br><span class="muted" style="font-size:11px">+' + fmt(c.impsSyn) + ' partner zones' + (synN > 1 ? ' at 1/' + synN : '') + '</span>' : '');
|
||||
const synN0 = Math.max(1, Math.floor(Number(D.rates && D.rates.synRateDivisor) || 1)); // network rate (Marty, 2026-10-27, 4:1)
|
||||
const synT = Math.max(1, Math.floor(Number(D.rates && D.rates.synRateDivisorText != null ? D.rates.synRateDivisorText : synN0) || 1)); // text ads (Marty, 2026-11-12, 1/10)
|
||||
const offTxt = c => { const synN = c.type === 'text' ? synT : synN0; return (c.impsNas ? '<br><span class="muted" style="font-size:11px">+' + fmt(c.impsNas) + ' network' + (synN > 1 ? ' at 1/' + synN : '') + '</span>' : '')
|
||||
+ (c.impsSyn ? '<br><span class="muted" style="font-size:11px">+' + fmt(c.impsSyn) + ' partner zones' + (synN > 1 ? ' at 1/' + synN : '') + '</span>' : ''); };
|
||||
CR.sub(live.length + ' live · ' + fmt(D.availableCredits) + ' credits available');
|
||||
const hours = new Array(24).fill(0); Object.values(D.hours || {}).forEach(a => (a || []).forEach((n, i) => { hours[i] += Number(n) || 0; })); // last 7 days by UTC hour, all campaigns
|
||||
const week = hours.reduce((a, b) => a + b, 0);
|
||||
@@ -35,7 +36,7 @@
|
||||
CR.tile({ k: 'Views delivered', v: fmt(views), series: week ? hours : null, note: week ? fmt(week) + ' in 7 days, by hour' : '' }),
|
||||
CR.tile({ k: 'Today\'s viewing', v: EARN.views + ' / ' + EARN.target, note: EARN.streakDay > 1 ? 'streak day ' + EARN.streakDay : '' })].join('');
|
||||
const r = D.rates || {};
|
||||
$('rateLine').textContent = 'Rates: ' + r.bannerCreditsPerBatch + ' credits per ' + r.bannerBatch + ' banner views, ' + r.textCreditsPerBatch + ' per ' + r.textBatch + ' text views' + (synN > 1 ? ' here (views on the partner network and in other members\u2019 zones cost 1/' + synN + ' of that)' : '') + ', ' + fmt(slotInfo().credits) + ' purchased credits for a ' + slotInfo().days + '-day login slot (' + (slotInfo().free ? slotInfo().free + ' of ' + slotInfo().max + ' open' : 'all ' + slotInfo().max + ' taken' + (slotInfo().queued ? ', ' + slotInfo().queued + ' in line' : '') + ', reserve the next one') + '). Viewing pays ' + EARN.claimCredits + ' credits for ' + EARN.target + ' timed views a day.';
|
||||
$('rateLine').textContent = 'Rates: ' + r.bannerCreditsPerBatch + ' credits per ' + r.bannerBatch + ' banner views, ' + r.textCreditsPerBatch + ' per ' + r.textBatch + ' text views' + (synN0 > 1 ? ' here (views on the partner network and in other members\u2019 zones cost 1/' + synN0 + ' of that for banners' + (synT !== synN0 ? ', 1/' + synT + ' for text ads' : '') + ')' : '') + ', ' + fmt(slotInfo().credits) + ' purchased credits for a ' + slotInfo().days + '-day login slot (' + (slotInfo().free ? slotInfo().free + ' of ' + slotInfo().max + ' open' : 'all ' + slotInfo().max + ' taken' + (slotInfo().queued ? ', ' + slotInfo().queued + ' in line' : '') + ', reserve the next one') + '). Viewing pays ' + EARN.claimCredits + ' credits for ' + EARN.target + ' timed views a day.';
|
||||
// traffic-light status (2026-10-20): live green, running low amber (80%+ of the budget spent), out red, paused grey
|
||||
const stKey = c => c.status === 'queued' ? 'queued' : c.status === 'cancelled' ? 'cancelled' : c.scheduled ? 'sched' : c.status === 'active' ? (c.type !== 'login' && c.budget > 0 && c.spent / c.budget >= 0.8 ? 'low' : 'live') : c.status === 'paused' ? 'paused' : c.status === 'out' ? 'out' : c.status === 'done' ? 'ended' : '';
|
||||
const ST_LABEL = { queued: 'In line', cancelled: 'Cancelled, refunded', sched: 'Scheduled', live: 'Live', low: 'Running low', paused: 'Paused', out: 'Out of credits', ended: 'Ended' };
|
||||
@@ -50,7 +51,7 @@
|
||||
+ (!['done', 'cancelled'].includes(c.status) ? '<button class="btn sm" type="button" data-edit="' + c.id + '" title="' + (c.edits ? 'Edit the link, ' + (c.type === 'banner' ? 'image' : c.type === 'text' ? 'text' : 'name') + ' (' + fmt(D.editFee) + ' credits)' : 'Fix the link, ' + (c.type === 'banner' ? 'image' : c.type === 'text' ? 'text' : 'name') + ' (first edit free)') + '">Edit</button>' : '') + '</span></div>').join('')
|
||||
: '<div class="rw"><span class="muted">No ads yet. Launch one: a banner, a text ad or a login-ad slot.</span></div>';
|
||||
if (D.gauntletPending) $('earnNote').insertAdjacentHTML('afterend', '<div class="muted" style="margin-top:8px">Your welcome credits unlock after the short welcome tour on <a href="/tools">the classic dashboard</a>.</div>');
|
||||
$('foot').textContent = 'views = views here on LinkSpin; network = the partner ad network; partner zones = other members\u2019 zones on their own sites' + (synN > 1 ? ' (network and partner-zone views cost 1/' + synN + ' of the rate here, so ' + synN + ' of them cost what 1 view here does)' : '') + ' · a paused ad keeps its credits · unspent credits return when an ad ends';
|
||||
$('foot').textContent = 'views = views here on LinkSpin; network = the partner ad network; partner zones = other members\u2019 zones on their own sites' + (synN0 > 1 ? ' (network and partner-zone views cost 1/' + synN0 + ' of the rate here, so ' + synN0 + ' of them cost what 1 view here does' + (synT !== synN0 ? '; text ads 1/' + synT : '') + ')' : '') + ' · a paused ad keeps its credits · unspent credits return when an ad ends';
|
||||
$('rows').querySelectorAll('[data-pause]').forEach(b => b.addEventListener('click', () => act('/api/my/campaigns/' + b.dataset.pause + '/pause')));
|
||||
$('rows').querySelectorAll('[data-resume]').forEach(b => b.addEventListener('click', () => act('/api/my/campaigns/' + b.dataset.resume + '/resume')));
|
||||
$('rows').querySelectorAll('[data-top]').forEach(b => b.addEventListener('click', async () => { const v = await dialog({ title: 'Top up #' + b.dataset.top, text: 'Add credits to this ad. You have ' + fmt(D.availableCredits) + ' available.', fields: [{ k: 'credits', label: 'Credits to add', value: '25', mono: true }], ok: 'Add' }); if (!v) return; try { await api('/api/my/campaigns/' + b.dataset.top + '/topup', { credits: Number(v.credits) }); toast('Topped up.'); load(); } catch (e) { toast(e.message, true); } }));
|
||||
|
||||
+3
-1
@@ -837,12 +837,14 @@
|
||||
const tbl = document.createElement('div');
|
||||
tbl.className = 'tablewrap';
|
||||
const synN = Math.max(1, Math.floor(Number(r.rates && r.rates.synRateDivisor) || 1)); // network rate (Marty, 2026-10-27, 4:1)
|
||||
const synT = Math.max(1, Math.floor(Number(r.rates && r.rates.synRateDivisorText != null ? r.rates.synRateDivisorText : synN) || 1)); // text ads (Marty, 2026-11-12, 1/10)
|
||||
const nOf = c => c.type === 'text' ? synT : synN;
|
||||
tbl.innerHTML = '<table class="camp-table"><thead><tr><th>Name</th><th>Type</th><th class="num">Views here</th><th class="num" title="Impressions on the partner ad network plus views in other members\u2019 zones on their own sites (banner and text ads)' + (synN > 1 ? ', at 1/' + synN + ' of the rate here' : '') + '">Network views</th><th class="num">Clicks</th>'
|
||||
+ '<th class="num">Spent</th><th class="num">Budget</th><th>Status</th><th></th></tr></thead><tbody>'
|
||||
+ r.campaigns.map(c => '<tr><td data-l="Campaign"><b>' + c.name + '</b>' + hourBars(r.hours && r.hours[c.id]) + geoLine(r.geo && r.geo[c.id]) + '</td>'
|
||||
+ '<td data-l="Type">' + c.type + (c.type === 'banner' && c.width ? ' <span class="muted small">' + c.width + '×' + c.height + '</span>' : '') + (c.dailyCap ? ' <span class="muted small" title="daily cap: ' + c.dailyCap + ' credits, ' + (c.daySpent || 0) + ' spent today">cap ' + c.dailyCap + '/day</span>' : '') + (c.geo ? ' <span class="muted small" title="shown only to viewers in these country tiers">tier ' + esc(c.geo.replace(/,/g, '+')) + '</span>' : '') + schedChips(c) + '</td>'
|
||||
+ '<td class="num" data-l="Views here">' + c.imps.toLocaleString() + '</td>'
|
||||
+ '<td class="num" data-l="Network views">' + (['banner', 'text'].includes(c.type) ? ((c.impsNas || 0) + (c.impsSyn || 0)).toLocaleString() + (synN > 1 && (c.impsNas || c.impsSyn) ? ' <span class="muted small">at 1/' + synN + '</span>' : '') : '<span class="muted small" title="only banner and text ads syndicate to the network">n/a</span>') + '</td>'
|
||||
+ '<td class="num" data-l="Network views">' + (['banner', 'text'].includes(c.type) ? ((c.impsNas || 0) + (c.impsSyn || 0)).toLocaleString() + (nOf(c) > 1 && (c.impsNas || c.impsSyn) ? ' <span class="muted small">at 1/' + nOf(c) + '</span>' : '') : '<span class="muted small" title="only banner and text ads syndicate to the network">n/a</span>') + '</td>'
|
||||
+ '<td class="num" data-l="Clicks">' + c.clicks + (r.clickSources && r.clickSources[c.id] ? '<div class="muted small clk-src" title="where the clicks happened">' + Object.entries(r.clickSources[c.id]).sort((a, b) => b[1] - a[1]).map(([k, v]) => '<span>' + esc(k) + ' ' + v + '</span>').join('') + (c.impsNas ? ' · network: see Network views' : '') + '</div>' : '') + '</td>'
|
||||
+ '<td class="num" data-l="Spent">' + c.spent + '</td><td class="num" data-l="Budget">' + c.budget + '</td>'
|
||||
+ '<td data-l="Status">' + (c.status === 'out' ? '<span class="badge amber">budget spent</span>' : c.status === 'done' ? '<span class="muted">ended</span>' : c.scheduled ? '<span class="badge">scheduled</span>' : c.status) + '</td>'
|
||||
|
||||
+1
-1
@@ -1020,7 +1020,7 @@
|
||||
<script src="/assets/tools.js?v=20261011a"></script>
|
||||
<script src="/assets/wallet.js?v=20261021a"></script>
|
||||
<script src="/assets/promo.js?v=20261020bs3"></script>
|
||||
<script src="/assets/my.js?v=20261111tank"></script>
|
||||
<script src="/assets/my.js?v=20261112txt"></script>
|
||||
<script src="/assets/chat.js?v=20261016a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user