diff --git a/ads.js b/ads.js index 15bbd9c..4eb62b0 100644 Binary files a/ads.js and b/ads.js differ diff --git a/audit.js b/audit.js index 09a41ee..6f8f102 100644 --- a/audit.js +++ b/audit.js @@ -12,7 +12,7 @@ function refunded() { const out = {}; try { for (const f of fs.readdirSync(R.dat async function run() { const out = { checkedAt: Date.now(), checks: [] }; if (!db.enabled()) { out.checks.push({ name: 'Counters', ok: true, detail: 'JSON mode: not checked', issues: [] }); return out; } - const camps = await db.q("SELECT id, name, type, status, imps, clicks, spent, accrued, budget, created, house FROM campaigns WHERE house=0 OR house IS NULL"); + const camps = await db.q("SELECT id, name, type, status, imps, clicks, spent, accrued, budget, created, house, expires FROM campaigns WHERE house=0 OR house IS NULL"); const back = refunded(); for (const c of camps) if (back[c.id]) c.spent = Math.max(0, Number(c.spent) - back[c.id]); // already made right const logStart = (await db.q('SELECT MIN(day) d FROM camp_hours'))[0].d; const logStartMs = logStart ? Date.parse(logStart + 'T00:00:00Z') : 0; const byType = t => camps.filter(c => c.type === t); @@ -36,8 +36,8 @@ async function run() { { const rows = await db.q('SELECT campaign_id, COUNT(DISTINCT day) d FROM camp_hours WHERE n>0 GROUP BY campaign_id'); const shown = {}; for (const r of rows) shown[r.campaign_id] = Number(r.d); const issues = []; - for (const c of byType('login')) { const charged = Math.round((Number(c.spent) + Number(c.accrued || 0)) / 100), s = shown[c.id] || 0; if (charged > s) issues.push('#' + c.id + ' ' + c.name.slice(0, 30) + ': charged ' + charged + ' day(s), shown on ' + s); } - add('login ads: days charged vs days shown', issues, byType('login').length + ' campaigns compared'); + for (const c of byType('login').filter(c => !c.expires)) { const charged = Math.round((Number(c.spent) + Number(c.accrued || 0)) / 100), s = shown[c.id] || 0; if (charged > s) issues.push('#' + c.id + ' ' + c.name.slice(0, 30) + ': charged ' + charged + ' day(s), shown on ' + s); } + add('login ads: days charged vs days shown', issues, byType('login').filter(c => !c.expires).length + ' per-day campaigns compared (30-day slots are paid up front)'); } // 4. featured: a live booking older than two hours must have views { diff --git a/chatbot.js b/chatbot.js index 95cbc45..a01ff52 100644 --- a/chatbot.js +++ b/chatbot.js @@ -16,7 +16,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-10-17'; // the day the CANNED answers and FACTS below were last checked against the site +const KNOWLEDGE_DATE = '2026-10-18'; // the day the CANNED answers and FACTS below were last checked against the site function init(opts) { DATA_DIR = opts.dataDir; chain = opts.chain; } function key() { @@ -31,6 +31,8 @@ const SUPPORT_RE = /(contact|reach|email|e-mail|message|talk to|speak (to|with)| const CANNED = [ { re: SUPPORT_RE, handoff: true, a: 'Open Help in your Control Room (' + SITE_URL + '/help) to send Marty a ticket, and his replies land right there and in your email. Not signed in or locked out? Use ' + SITE_URL + '/support. You can also tap "Send this to support" below and I will pass this chat along.' }, + { re: /(log ?-?in|sign ?-?in) (ad|ads|spot|sponsor|slot|slots)|(ad|sponsor) (on|at) (the )?(log ?-?in|sign ?-?in)/i, + a: 'A login ad is a slot: 1,000 purchased credits buys 30 days of your page, full screen, to every member right after they sign in, with unlimited sign-in impressions and nothing charged per day. At most 3 member slots run at once because they share the same sign-ins, first come first served; when all 3 are taken the Ads screen says so and a place opens when a running slot ends its 30 days. Login ads spend purchased credits only, so earned credits go to banner and text ads instead. Buy one from Ads, New ad, Login ad.' }, { re: /(instant ?ad ?pay|[^a-z]iap[^a-z]|differen|same as|another (site|program|property)|why (two|another)|sister (site|property)|which (one|site) (should|do))/i, a: 'InstantAdPay is the ad marketplace: you buy ad packages there, earn credits by viewing ads, and get paid when your line buys. LinkSpin is the tool side of the same network: a link rotator, a page builder and ad zones for your own sites, free with an email address. Its packages buy ad delivery across the LinkSpin viewer, every member zone and the partner network, and they pay your sponsor line the same way, inside the purchase transaction. Same people above and below you, same wallet, and your InstantAdPay username and profile carry over when you sign in with the same email.' }, { re: /(pyramid|ponzi|scam|scheme|mlm|legit)/i, @@ -60,7 +62,7 @@ const CANNED = [ { re: /(price|cost|packages?|how much is|ladder|\$10|\$25|\$50|\$100|\$250|\$500|door package)/i, a: 'Six packages, priced in dollars and settled in POL at the live rate: the $10 door (1,000 credits, for trying the ads; it does not count toward qualification), $25 Starter (2,500), $50 Builder (5,000), $100 Growth (10,000), $250 Leader (25,000) and $500 Network (50,000). One credit is one cent of ad delivery. Any package of $25 or more makes you a qualifying buyer for your sponsor. Buy under Credits in your Control Room; the live ladder is on the home page.' }, { re: /(credits?|impression|cpm|what do i get|what am i buying|one cent|1 cent)/i, - a: 'One credit is one cent of ad delivery: banner, text and login ads shown across the LinkSpin ad viewer, every member zone and the partner network, managed from the Ads screen. Credits come two ways, bought in a package or earned free (zones, the daily ad set, videos, verified visits, daily sign-in). Earned credits spend on banner and text campaigns; the login spot takes purchased credits. Credits are advertising, not money: they never cash out and are never converted to crypto.' }, + a: 'One credit is one cent of ad delivery: banner, text and login ads shown across the LinkSpin ad viewer, every member zone and the partner network, managed from the Ads screen. Credits come two ways, bought in a package or earned free (zones, the daily ad set, videos, verified visits, daily sign-in). Earned credits spend on banner and text campaigns; a login-ad slot (1,000 purchased credits for 30 days) takes purchased credits only. Credits are advertising, not money: they never cash out and are never converted to crypto.' }, { re: /(drain (my|your) wallet|stop and go back|trust wallet.*(warn|block|red)|wallet (warning|blocked))/i, a: 'That red "this transaction will drain your wallet" screen is Trust Wallet\'s own safety rule, not a problem with the purchase: it blocks any transaction that spends most of the POL in the wallet. Ways through: buy a smaller package first, add some POL so the purchase is well under half the balance, or connect a different wallet. SafePal, MetaMask and Phantom have no such block. Extra POL always stays yours. If the next try says WalletConnect disconnected, open the Wallet screen, disconnect, then connect again.' }, { re: /(which wallet|what wallet|best wallet|recommended wallet|set ?up (a )?wallet|buy (pol|crypto|polygon)|get (pol|crypto)|moonpay|card to crypto|no crypto|never (had|held|owned) crypto|metamask|safepal|phantom|coinbase wallet)/i, @@ -95,8 +97,8 @@ FACTS: - PRODUCT, all free with an email account: SPIN LINKS (the rotator: one short link, /r/, rotates between destinations by weight; pause any destination; a fallback for when all are off; one-hop redirect; every click recorded with day, country, source, device and a daily-salted visitor hash; bots filtered on the server; click ids and sub ids such as clickid, subid, s1 to s4 pass through to the destination; split tests by tagging the same link with different sub ids; a demo spin on the home page needs no account; DAYPARTING is live: a 7x24 hours grid per spin and per destination, time zone by name or the local time of the visitor, presets, and 'my best hours' from the clicks of the member after 200 clicks; automatic HEALTH CHECKS are live: every destination is checked every 30 minutes, a dead or parked one is paused after three failing checks and resumed when it passes twice, the owner is told once, and Check now runs it on demand). PAGES (page builder: scan any offer URL, get a bridge, review or squeeze page; designs, palettes, layouts and niche presets with hero images; leads to the member's own list, CSV or webhook; published on the pages domain lookfirst.page; sales, advertorial and press-release layouts are coming). ZONES (an ad slot on the member's own site: one async script tag, nine sizes 728x90, 468x60, 300x250, 336x280, 250x250, 125x125, 160x600, 120x600, 320x50; waterfall = LinkSpin member campaign, then a network ad for 728x90 and 468x60, then the LinkSpin house banner; pays ad credits per VIEWABLE impression, half the banner on screen for one second, bots never, 50 credited views per visitor per zone per day; rates 1 credit per 5 viewable member-ad views and 1 per 10 network-ad views, 1 per 8 on a Verified zone; warm-up: a zone earns after its first 100 on-site views with at least 40 percent viewable and goes on hold below that; origin lock: paid ads serve only on the declared site and its subdomains, elsewhere the house banner shows and nothing is earned; up to 50 zones per account; PUBLISHER PROGRAM at /publishers for site owners, tiers Standard (default) and Verified (admin-reviewed site, better network rate)). AUDIENCES (first-party retargeting: "My visitors" collects everyone who viewed the member's pages and zones for 30 days; a pixel tag /p.js for other sites; campaigns can "show only to" or "never show to" an audience; nothing personal stored). PROMO TOOLS at /tools#promo (social posts, text-a-friend, email swipes, banners, objection bank, hook videos; five hook angles with videos: links, pages, zones, audiences, stack; angle links are the invite link plus ?v=). REPORTS (every link in one view, plus Pages, Zones, and since 2026-10-12 Traffic sources and Placements). BLOG at /blog with RSS at /blog/feed.xml. TRAFFIC SOURCES at /sources (2026-10-12): a source is a record of a network the member buys traffic on, created from a catalog of networks (PropellerAds, Zeropark, Adsterra, ExoClick, HilltopAds, TrafficStars, PopAds and more, with each network's macro tokens and conversion postback URL; account-specific slots such as a goal id are filled in at creation) or defined by hand; a spin link is pointed at one source (Share kit on the Links screen, or the Sources screen), and then the Share kit's first row is the exact campaign URL for that network with its macros already in place; when a click that came through that source converts (join, lead, wallet, purchase, or a partner-reported conversion; the member picks which) LinkSpin fires that network's own postback with the network's click id and the payout, server to server, and only the network that sent the click is told; Reports show clicks, uniques and conversions by source and by placement (the value the network's zone, placement, site, campaign, creative, banner or keyword macro carried); up to 30 sources per account, 20 params each; a source with no postback still builds the campaign URL and shows in Reports; the account-level Postbacks list on the Links screen (for the member's own tracker) still works alongside. Knowledge checked on ${KNOWLEDGE_DATE}. - PACKAGES (priced in dollars, settled in POL at the live rate, 1 credit = 1 cent of ad delivery): $10 door = 1,000 credits, for trying the ads, does NOT count toward qualification; $25 Starter = 2,500; $50 Builder = 5,000; $100 Growth = 10,000; $250 Leader = 25,000; $500 Network = 50,000. Any package of $25 or more makes the buyer a qualifying buyer for their sponsor. - THE SPLIT, same transaction on Polygon, fixed in the contract: 50 percent direct sponsor, 20 percent level 2, 10 percent level 3, 10 percent + 10 percent to the two admin wallets. Level 1 pays from a referral's first qualifying purchase once the sponsor's payouts are on. Level 2 opens after two of the member's people buy a qualifying ($25 or larger) package, level 3 after five. An unfilled tier passes up the line to the next qualified member, then to the platform. Nothing is held, there are no withdrawals, no pending balances. Contract ${CONTRACT} on Polygon, verified on Polygonscan; plain-language review at ${SITE_URL}/contract; live ledger at ${SITE_URL}/ledger with a verify link on every row. -- CREDITS VS POL: every member, free ones included, earns CREDITS (zones, the daily ad set with a claim streak, watch-to-earn videos, verified visits, a daily sign-in bonus). Credits buy the member's own banner and text ads (the login spot takes purchased credits) and NEVER cash out or convert to crypto. POL only reaches a wallet through the contract split when a package sells in the member's line. Never promise or estimate income. -- AD FORMATS members buy with credits: banner ads (standard sizes), text ads, full-screen login ads (one sponsor a day, purchased credits), plus solo ads to member inboxes, watch-to-earn video, verified visits. Banner and text ads also run on member zones and the partner network. +- CREDITS VS POL: every member, free ones included, earns CREDITS (zones, the daily ad set with a claim streak, watch-to-earn videos, verified visits, a daily sign-in bonus). Credits buy the member's own banner and text ads (a login-ad slot takes purchased credits only) and NEVER cash out or convert to crypto. POL only reaches a wallet through the contract split when a package sells in the member's line. Never promise or estimate income. +- AD FORMATS members buy with credits: banner ads (standard sizes), text ads, full-screen login ads (a flat slot: 1,000 PURCHASED credits for 30 days of unlimited sign-in impressions, never charged per day; at most 3 member slots live at once, first come first served, a 4th is refused until one ends; house login ads only show when no member slot is running; earned credits never fund login ads), plus solo ads to member inboxes, watch-to-earn video, verified visits. Banner and text ads also run on member zones and the partner network. - ACCOUNT: join at ${SITE_URL}/join with email only, a six-digit code, no password. Wallet linking happens inside the Control Room (Credits screen): one signature to link, then payouts switch on by activating (one transaction, gas only) or by buying any package. SafePal is the recommended wallet; MetaMask, Phantom (turn Polygon on first) and any WalletConnect wallet work; Trust Wallet blocks a buy that spends most of its POL. MoonPay card on-ramp from the Credits screen puts POL on Polygon into the member's own wallet. - SPONSOR: the invite link opened most recently sets the sponsor (30-day cookie), shown on the join page, locked when the account is created; the contract binds the buyer to that sponsor at the first purchase. CARRY-OVER: Crypto Team Build Network members who sign in with the email they use on InstantAdPay get their InstantAdPay sponsor from the network registry automatically when no invite link was used. Wrong sponsor before the first purchase: the admin can move the account. Members should switch on payouts before their people buy. - CONTROL ROOM screens: Links, Pages, Zones (with Audiences), Ads, Credits, Reports, Team (three levels, who has payouts on, who bought, qualifying-buyer counts), Wallet (what was paid to this wallet, payout history). More at ${SITE_URL}/tools: Promo tools, Training, Pipeline (a follow-up board for prospects and directs), My line (including the holding tank: members who joined with no sponsor wait there and can be adopted by a member with payouts on and their own qualifying package), Profile. diff --git a/public/admin.html b/public/admin.html index 64ec4a1..60e47d7 100644 --- a/public/admin.html +++ b/public/admin.html @@ -451,6 +451,6 @@ - + diff --git a/public/ads.html b/public/ads.html index 14dedda..194d4b7 100644 --- a/public/ads.html +++ b/public/ads.html @@ -64,12 +64,12 @@
CampaignCreativeBudgetViewsClicksStatus

Earn credits

loading
-

Where your ads run

Bannerthe ad viewer here, every member zone on outside sites, and the partner network
Textthe ad viewer and the partner network
Loginfull screen to every member right after they sign in, one sponsor a day
+

Where your ads run

Bannerthe ad viewer here, every member zone on outside sites, and the partner network
Textthe ad viewer and the partner network
Loginfull screen to every member right after they sign in: 1,000 purchased credits for a 30-day slot, 3 slots at a time
- + diff --git a/public/assets/admin.js b/public/assets/admin.js index d95b611..10fcf99 100644 --- a/public/assets/admin.js +++ b/public/assets/admin.js @@ -792,7 +792,10 @@ bannerBatch: ['Banner: views per batch', 'impressions counted before a banner campaign is charged'], bannerCreditsPerBatch: ['Banner: credits per batch', 'charged to the advertiser per batch'], textBatch: ['Text ad: views per batch', ''], textCreditsPerBatch: ['Text ad: credits per batch', ''], - loginCreditsPerDay: ['Login ad: credits per day', 'flat daily charge while active'], + loginSlotCredits: ['Login ad: slot price (credits)', 'one flat buy, purchased credits only, unlimited sign-in impressions'], + loginSlotDays: ['Login ad: slot length (days)', 'the slot ends and frees its place after this many days'], + loginSlotsMax: ['Login ad: member slots at once', 'a new slot is refused while this many are live; house ads do not count'], + 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'], welcomeCredits: ['Welcome credits', 'granted after the welcome tour'], diff --git a/public/assets/ads-screen.js b/public/assets/ads-screen.js index cbf5483..ee32a70 100644 --- a/public/assets/ads-screen.js +++ b/public/assets/ads-screen.js @@ -7,8 +7,13 @@ const NOTE = { banner: 'Runs in the ad viewer, in every member zone on outside sites, and on the partner network. Views are timed on the server. Spends purchased or earned credits.', text: 'A headline and one line. Runs in the ad viewer and on the partner network. Spends purchased or earned credits.', - login: 'Your page, full screen, to every member right after they sign in. One sponsor a day, purchased credits only. No creative needed: the page is the ad.' + login: 'Your page, full screen, to every member right after they sign in. A slot is 1,000 purchased credits for 30 days of unlimited sign-in impressions, paid once and never charged per day. 3 slots at a time, first come first served. No creative needed: the page is the ad.' }; + // login slots (same rule as InstantAdPay): one flat price, a fixed run, a cap on member slots live at once + const slotInfo = () => { const r = (D && D.rates) || {}; const ls = (D && D.loginSlots) || {}; const max = ls.max || r.loginSlotsMax || 3; + return { credits: ls.credits || r.loginSlotCredits || 1000, days: ls.days || r.loginSlotDays || 30, max, used: ls.used || 0, free: ls.free != null ? ls.free : max }; }; + const loginNote = () => { const L = slotInfo(); + return 'Your page, full screen, to every member right after they sign in. A slot is ' + fmt(L.credits) + ' purchased credits for ' + L.days + ' days of unlimited sign-in impressions, paid once and never charged per day. ' + L.max + ' slots at a time, first come first served. No creative needed: the page is the ad.'; }; const host = u => { try { return new URL(u).hostname.replace(/^www\./, ''); } catch (e) { return u; } }; async function load() { try { [D, EARN] = await Promise.all([CR.get('/api/my/campaigns'), CR.get('/api/my/earn')]); } catch (e) { CR.sub('could not load'); return; } @@ -24,18 +29,19 @@ 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, ' + r.loginCreditsPerDay + ' per day for the login spot. 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, ' + fmt(slotInfo().credits) + ' purchased credits for a ' + slotInfo().days + '-day login slot (' + slotInfo().free + ' of ' + slotInfo().max + ' open). Viewing pays ' + EARN.claimCredits + ' credits for ' + EARN.target + ' timed views a day.'; const st = c => c.scheduled ? 'Scheduled' : c.status === 'active' ? 'Live' : c.status === 'paused' ? 'Paused' : c.status === 'out' ? 'Out of credits' : c.status === 'done' ? 'Ended' : '' + esc(c.status) + ''; - const cr = c => c.type === 'banner' ? (c.imageUrl ? '' : '') + '' + c.width + 'x' + c.height + '' : c.type === 'text' ? '' + esc(c.title) + '
' + esc(c.body || '') + '' : 'full page'; + const cr = c => c.type === 'banner' ? (c.imageUrl ? '' : '') + '' + c.width + 'x' + c.height + '' : c.type === 'text' ? '' + esc(c.title) + '
' + esc(c.body || '') + '' : 'full page' + (c.type === 'login' && c.expires ? '
' + (c.expires > Date.now() ? 'slot ends ' : 'ended ') + new Date(c.expires).toLocaleDateString(undefined, { month: 'short', day: 'numeric' }) + '' : '') + '
'; $('rows').innerHTML = cs.length ? cs.map(c => '
' + esc(c.name) + ' ' + esc(c.type) + '' + (c.audience ? ' ' + esc((((D && D.audiences) || []).find(a => a.id === c.audience) || {}).name || 'audience') + (c.audienceMode === 'exclude' ? ' · excluded' : '') + '' : '') + '
#' + c.id + ' · ' + esc(host(c.targetUrl)) + (c.geo ? ' · tiers ' + esc(c.geo) : '') + (c.dailyCap ? ' · cap ' + c.dailyCap + '/day' : '') + '
' + cr(c) + '
' + fmt(c.spent) + ' / ' + fmt(c.budget) + '
' + fmt(c.imps) + (c.impsNas ? '
+' + fmt(c.impsNas) + ' network' : '') + '
' + fmt(c.clicks) + '' + st(c) + '' + (c.status === 'active' ? '' : c.status === 'paused' ? '' : '') - + (['active', 'paused', 'out'].includes(c.status) ? '' : '') + '
').join('') - : '
No ads yet. Launch one: a banner, a text ad or the login spot.
'; + + (['active', 'paused', 'out'].includes(c.status) && c.type !== 'login' ? '' : '') + '').join('') + : '
No ads yet. Launch one: a banner, a text ad or a login-ad slot.
'; if (D.gauntletPending) $('earnNote').insertAdjacentHTML('afterend', '
Your welcome credits unlock after the short welcome tour on the classic dashboard.
'); $('foot').textContent = 'views = timed views in the ad viewer plus member zones; network = the partner ad network · 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); } })); + slotChip(); if (!$('composer').hidden) setType(TYPE); earnPaint(); } async function act(path) { try { await api(path, {}); load(); } catch (e) { toast(e.message, true); } } @@ -66,11 +72,18 @@ window.addEventListener('storage', e => { if (e.key === 'iap-view-done') earnRefresh(); }); $('earnClaim').addEventListener('click', async () => { try { const r = await api('/api/my/claim', {}); toast('+' + r.credited + ' credits' + (r.streakDay > 1 ? ', streak day ' + r.streakDay : '') + '. Spend them on an ad.'); load(); } catch (e) { toast(e.message, true); } }); // -- composer - function setType(t) { TYPE = t; document.querySelectorAll('#typeChips .chip').forEach(c => c.classList.toggle('on', c.dataset.t === t)); $('typeNote').textContent = NOTE[t]; $('bannerFields').hidden = t !== 'banner'; $('textFields').hidden = t !== 'text'; $('fCap').parentElement.hidden = t === 'login'; cost(); preview(); } + function setType(t) { TYPE = t; document.querySelectorAll('#typeChips .chip').forEach(c => c.classList.toggle('on', c.dataset.t === t)); $('typeNote').textContent = t === 'login' ? loginNote() : NOTE[t]; $('bannerFields').hidden = t !== 'banner'; $('textFields').hidden = t !== 'text'; $('fCap').parentElement.hidden = t === 'login'; + const L = slotInfo(), full = t === 'login' && !L.free; const fb = $('fBudget'); + if (t === 'login') { fb.dataset.keep = fb.dataset.keep || fb.value; fb.value = L.credits; fb.readOnly = true; } else { if (fb.readOnly && fb.dataset.keep) fb.value = fb.dataset.keep; delete fb.dataset.keep; fb.readOnly = false; } + $('fGo').disabled = full; $('fGo').title = full ? 'All login-ad slots are taken right now' : ''; + cost(); preview(); } + function slotChip() { const ch = document.querySelector('#typeChips .chip[data-t="login"]'); if (!ch || !D) return; const L = slotInfo(); ch.textContent = 'Login ad' + (L.free ? ' (' + L.free + ' of ' + L.max + ' open)' : ' (full)'); } function cost() { const b = Math.floor(Number($('fBudget').value) || 0); const r = D ? D.rates : {}; let s = ''; if (TYPE === 'banner') s = 'about ' + fmt(Math.floor(b / (r.bannerCreditsPerBatch || 2) * (r.bannerBatch || 10))) + ' timed views'; else if (TYPE === 'text') s = 'about ' + fmt(Math.floor(b / (r.textCreditsPerBatch || 1) * (r.textBatch || 10))) + ' timed views'; - else s = 'about ' + Math.floor(b / (r.loginCreditsPerDay || 100)) + ' day' + (Math.floor(b / (r.loginCreditsPerDay || 100)) === 1 ? '' : 's') + ' as the login sponsor (' + (r.loginCreditsPerDay || 100) + ' per day)'; + else { const L = slotInfo(); $('fCost').innerHTML = L.free + ? '' + fmt(L.credits) + ' purchased credits for ' + L.days + ' days of unlimited sign-in impressions · ' + L.free + ' of ' + L.max + ' slots open' + : 'All ' + L.max + ' login-ad slots are taken right now. A place opens when a running slot ends its ' + L.days + ' days; check back in a few days.'; return; } $('fCost').innerHTML = b >= 10 ? s.replace(/(about )([\d,]+)/, '$1$2') : 'minimum 10 credits'; } function preview() { const p = $('prev'); if (TYPE === 'banner' && IMG) { const sz = ($('fSize').value || '728x90').split('x'); p.innerHTML = '
Preview
'; } else if (TYPE === 'text') p.innerHTML = '
Preview
' + esc($('fTitle').value || 'Your headline') + '
' + esc($('fBody').value || 'One line under it.') + '
' + esc(host($('fTarget').value || 'yoursite.com')) + '
'; @@ -95,7 +108,7 @@ if (TYPE === 'banner') { body.size = $('fSize').value; body.imageUrl = $('fImage').value.trim(); } if (TYPE === 'text') { body.title = $('fTitle').value; body.body = $('fBody').value; } $('fGo').disabled = true; - try { await api('/api/my/campaigns', body); toast('Launched. It is live in rotation now.'); $('composer').hidden = true; $('fName').value = ''; load(); } catch (e) { toast(e.message, true); } finally { $('fGo').disabled = false; } + try { await api('/api/my/campaigns', body); toast(TYPE === 'login' ? 'Launched. Your login-ad slot runs for ' + slotInfo().days + ' days.' : 'Launched. It is live in rotation now.'); $('composer').hidden = true; $('fName').value = ''; load(); } catch (e) { toast(e.message, true); } finally { $('fGo').disabled = TYPE === 'login' && !slotInfo().free; } }); CR.requireSession(load); })(); diff --git a/public/assets/my.js b/public/assets/my.js index 6d06b45..53c7cf3 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -785,7 +785,7 @@ try { const r = await (await fetch('/api/my/campaigns')).json(); if (r.error) return; - lastRates = r.rates; + lastRates = r.rates; lastSlots = r.loginSlots || null; if ($('cGeoHint') && r.tiers) $('cGeoHint').textContent = 'All three ticked = everyone. Tier 1: ' + r.tiers.t1.join(', ') + '. Tier 2: ' + r.tiers.t2.join(', ') + '. Tier 3: every other country. Geo applies to delivery on this site; a narrowed banner or text ad is kept off the worldwide partner network. ' + (r.geoReady ? '' : 'Country data is still loading, so narrowed campaigns pause until it is ready. ') + 'IP geolocation by DB-IP.'; // populate the banner-size dropdown once (ids map to NAS width/height) if (r.bannerSizes && $('cSize') && !$('cSize').options.length) @@ -799,14 +799,14 @@ if ($('spendNote')) $('spendNote').textContent = r.inCampaigns ? 'Not counting ' + r.inCampaigns.toLocaleString() + ' credits already set aside for your live campaigns. That budget spends down inside each campaign below. This number only moves when you start, top up or pause a campaign.' : 'This is what is not committed to a campaign. When you start one, its budget moves out of here and spends down inside the campaign.'; - $('spendRates').innerHTML = [['Banner', r.rates.bannerCreditsPerBatch + ' cr / ' + r.rates.bannerBatch + ' views'], ['Text', r.rates.textCreditsPerBatch + ' cr / ' + r.rates.textBatch + ' views'], ['Login', r.rates.loginCreditsPerDay + ' cr / day'], ['Solo', r.rates.soloCostPerRecipient + ' cr / delivery'], ['Featured', (r.rates.featuredPerDay || 40) + ' cr / day'], ['Visit', (r.rates.visitCostPerVisit || 3) + ' cr / visit']].map(x => '' + x[0] + ' ' + x[1] + '').join(''); + $('spendRates').innerHTML = [['Banner', r.rates.bannerCreditsPerBatch + ' cr / ' + r.rates.bannerBatch + ' views'], ['Text', r.rates.textCreditsPerBatch + ' cr / ' + r.rates.textBatch + ' views'], ['Login', (r.rates.loginSlotCredits || 1000).toLocaleString() + ' cr / ' + (r.rates.loginSlotDays || 30) + '-day slot'], ['Solo', r.rates.soloCostPerRecipient + ' cr / delivery'], ['Featured', (r.rates.featuredPerDay || 40) + ' cr / day'], ['Visit', (r.rates.visitCostPerVisit || 3) + ' cr / visit']].map(x => '' + x[0] + ' ' + x[1] + '').join(''); } $('rateLine').textContent = 'Available to spend: ' + r.availableCredits.toLocaleString() + (r.earnedCredits ? ' (' + r.purchasedCredits.toLocaleString() + ' purchased + ' + r.earnedCredits + ' earned)' : '') + (r.inCampaigns ? ' · ' + r.inCampaigns.toLocaleString() + ' set aside in live campaigns' : '') + ' credits · rates: banner ' + r.rates.bannerCreditsPerBatch + 'cr/' + r.rates.bannerBatch + ' views, text ' + r.rates.textCreditsPerBatch + 'cr/' + r.rates.textBatch - + ' views, login ' + r.rates.loginCreditsPerDay + 'cr/day, solo ' + + ' views, login ' + (r.rates.loginSlotCredits || 1000) + 'cr per ' + (r.rates.loginSlotDays || 30) + '-day slot, solo ' + (r.rates.soloCostPerRecipient || 5) + 'cr/delivery'; const el = $('campList'); el.innerHTML = ''; @@ -841,7 +841,7 @@ })); } catch (e) {} } - let lastRates = null; + let lastRates = null, lastSlots = null; function soloHint() { if (!lastRates || $('cType').value !== 'solo') return; const cost = lastRates.soloCostPerRecipient || 5; @@ -895,12 +895,15 @@ }); const WHERE = { banner: 'Runs in the ad viewer, on the home page, the live ledger, every Overview, the sidebar tile, and out in the Network Ad Space rotation across the wider network.', text: 'Runs in the ad viewer, the live ledger text slot, and out in the Network Ad Space rotation.', - login: 'Full screen for every member who signs in, ten seconds, once a day per member. Opens in a fresh tab, so any working page qualifies. Login ads spend purchased credits only.', + login: 'Full screen for every member who signs in, ten seconds, once a day per member. Opens in a fresh tab, so any working page qualifies. A slot is 1,000 purchased credits for 30 days of unlimited sign-in impressions, never charged per day. 3 slots at a time, first come first served. Login ads spend purchased credits only.', solo: 'Delivered into member inboxes under Earn credits. Each read is timed and rewarded, so it gets opened.', video: 'Plays in Watch videos and the Shorts feed under Earn credits. You pay only for completed watches.', featured: 'Your headline and link in the Featured strip on every member Overview for the days you book.', visits: 'A distinct member opens your site in a new tab, stays eight seconds and passes a check. Nobody counts twice.' }; - const whereHint = () => { const el = $('cWhere'); if (el) el.textContent = WHERE[$('cType').value] || ''; }; + const whereHint = () => { const el = $('cWhere'); if (!el) return; const t = $('cType').value; let s = WHERE[t] || ''; + if (t === 'login' && lastRates) s = s.replace('1,000', (lastRates.loginSlotCredits || 1000).toLocaleString()).replace('30 days', (lastRates.loginSlotDays || 30) + ' days').replace('3 slots', (lastRates.loginSlotsMax || 3) + ' slots'); + if (t === 'login' && lastSlots) s += lastSlots.free ? ' ' + lastSlots.free + ' of ' + lastSlots.max + ' slots open right now.' : ' All ' + lastSlots.max + ' slots are taken right now; a place opens when a running slot ends its ' + lastSlots.days + ' days.'; + el.textContent = s; }; whereHint(); // runs on every type change AND once at load, so the default type (banner) shows its size + image rows immediately function applyType() { // hoisted: loadCampaigns may run before this line is reached @@ -924,6 +927,7 @@ // solo ads have a real floor (5cr x 10 deliveries): default to 50 so 10 isn't rejected if (t === 'solo' && (!$('cBudget').value || Number($('cBudget').value) < 50)) $('cBudget').value = (lastRates && lastRates.soloCostPerRecipient ? lastRates.soloCostPerRecipient : 5) * 10; if (t === 'visits') visitHint(); + if (t === 'login') $('cBudget').value = (lastRates && lastRates.loginSlotCredits) || 1000; // a slot is one flat price $('cTitle').placeholder = t === 'solo' ? 'Subject line (max 80)' : 'Headline (max 60)'; soloHint(); if (t === 'video') videoHint(); diff --git a/public/earning.html b/public/earning.html index 296bc99..b20c502 100644 --- a/public/earning.html +++ b/public/earning.html @@ -60,7 +60,7 @@

6. Now spend it

Credits sitting in your balance do nothing. Campaigns › New campaign: pick a banner or a text ad, give it a name and a budget in credits, point it at your own invite link or wall, and launch. Banner and text ads also push out to the partner network, so a 100-credit campaign is a hundred cents of real delivery. The done screen has a one-tap button for this after every claim.

-

Two things to know: a campaign reserves its whole budget the moment you start it, so your available balance drops right away and never surprises you later, and login ads are the one format that needs purchased credits.

+

Two things to know: a campaign reserves its whole budget the moment you start it, so your available balance drops right away and never surprises you later, and login ads are the one format that needs purchased credits: a login-ad slot is 1,000 purchased credits for 30 days of unlimited sign-in impressions, 3 slots at a time, first come first served.

No income is guaranteed. Results depend on your effort. Cryptocurrency involves risk of loss. LinkSpin sells advertising; it is not an investment.