diff --git a/public/ads.html b/public/ads.html index a364cff..b022f7a 100644 --- a/public/ads.html +++ b/public/ads.html @@ -71,7 +71,7 @@ - + diff --git a/public/assets/conversions.js b/public/assets/conversions.js new file mode 100644 index 0000000..78a172e --- /dev/null +++ b/public/assets/conversions.js @@ -0,0 +1,70 @@ +// LinkSpin Conversions (conversion pixel, 2026-10-23): goals + pixel ids, the two snippets, a test button, and per goal the +// conversions and cost per goal by ad campaign (LinkSpin and InstantAdPay), spin link, destination and traffic source. +(function () { + const $ = id => document.getElementById(id); const esc = CR.esc, fmt = CR.fmt; + let RANGE = 30, D = null, PICK = ''; + CR.mount({ active: 'conversions', title: 'Conversions', sub: 'loading', actions: '
CSV
' }); + $('range').querySelectorAll('button').forEach(b => b.addEventListener('click', () => { RANGE = Number(b.dataset.d); $('range').querySelectorAll('button').forEach(x => x.classList.toggle('on', x === b)); $('csvBtn').href = '/api/my/conversions.csv?days=' + RANGE; load(); })); + const ago = ts => { if (!ts) return 'never'; const m = Math.round((Date.now() - ts) / 60000); return m < 1 ? 'just now' : m < 60 ? m + ' min ago' : m < 1440 ? Math.round(m / 60) + ' h ago' : Math.round(m / 1440) + ' d ago'; }; + const money = v => v ? '$' + Number(v).toFixed(2) : ''; + const METH = [['url', 'Address'], ['stored', 'Kept'], ['cookie', 'Cookie'], ['soft', '24 h match']]; + function snippets() { + const g = (D.goals || []).find(x => x.px === PICK) || (D.goals || [])[0]; + const base = D.base || ('https://' + (D.host || 'linkspin.app')); + if (!g) { ['snTag', 'snImg', 'snJs'].forEach(k => { $(k).textContent = 'Add a goal first. Its snippets show here.'; }); $('testBtn').disabled = true; $('testNote').textContent = ''; return; } + $('testBtn').disabled = false; + $('snTag').textContent = ''; + $('snImg').textContent = ''; + $('snJs').textContent = ''; + $('testNote').textContent = g.lastTest ? 'Last test received ' + ago(g.lastTest) : 'No test received yet'; + } + function paint() { + const goals = D.goals || []; + CR.sub(RANGE + ' days · ' + goals.length + ' goal' + (goals.length === 1 ? '' : 's') + ' · ' + fmt(D.total || 0) + ' counted'); + $('goalRows').innerHTML = goals.length ? goals.map(g => '
' + esc(g.name) + 'last ' + esc(ago(g.lastAt)) + (g.lastTest ? ' · test ' + esc(ago(g.lastTest)) : '') + '' + esc(g.px) + '' + (g.value ? esc(money(g.value)) : 'none') + '' + fmt(g.conv) + '
').join('') + : '
No goals yet. Add one, for example subscriber or sale.
'; + if (!goals.some(g => g.px === PICK)) PICK = goals.length ? goals[0].px : ''; + $('goalPick').innerHTML = goals.map(g => '').join(''); + snippets(); + const m = D.methods || {}; const tot = METH.reduce((n, [k]) => n + (m[k] || 0), 0); + $('methRows').innerHTML = METH.map(([k, label]) => '
' + label + '' + fmt(m[k] || 0) + '' + (tot ? Math.round((m[k] || 0) / tot * 100) + '%' : '·') + '
').join(''); + $('totalNote').textContent = D.selfTests ? D.selfTests + ' from your own clicks, kept as tests and left out' : ''; + $('goalReports').innerHTML = (D.byGoal || []).filter(G => G.n || !G.removed).map(G => { + const camp = G.campaigns.length ? G.campaigns.map(c => '
' + esc(c.name || ('Campaign #' + c.id)) + '' + esc(c.site) + ' #' + c.id + (c.spentAsOf ? ' · spend as of ' + esc(ago(c.spentAsOf)) : '') + '' + (c.spent != null ? fmt(c.spent) + ' cr' : '·') + '' + fmt(c.clicks) + '' + fmt(c.n) + '' + (c.rate != null ? c.rate + '%' : '·') + '' + (c.costPer != null ? fmt(c.costPer) + ' cr' : '·') + '
').join('') : '
No ad campaign conversions for this goal yet.
'; + const lst = (rows, f) => rows && rows.length ? rows.map(x => '
' + f(x) + '' + fmt(x.n) + '
').join('') : '
nothing yet
'; + const gm = G.methods || {}; + return '
Goal: ' + esc(G.goal) + (G.removed ? ' (removed)' : '') + ' · ' + fmt(G.n) + ' counted' + (G.value ? ' · ' + esc(money(G.value)) : '') + ' · ' + METH.map(([k, l]) => l + ' ' + fmt(gm[k] || 0)).join(', ') + '
' + + '

By ad campaign

CampaignSpentClicksGoalsRateCost / goal
' + camp + '
Cost per goal = the credits the campaign has spent so far / its conversions of this goal, in that site\'s ad credits. Clicks and goals are for the range above; spend is the campaign\'s total.
' + + '

By spin link

LinkGoals
' + lst(G.links, x => esc(x.name || x.code) + ' /r/' + esc(x.code) + '') + '
' + + '

By destination page

PageGoals
' + lst(G.dests, x => '' + esc(x.k) + '') + '
' + + '

By traffic source

SourceGoals
' + lst(G.sources, x => esc(x.name)) + '
A named source is one you set up under Sources; otherwise it is the referring site or the ad placement.
'; + }).join(''); + $('goalRows').querySelectorAll('[data-pick]').forEach(b => b.addEventListener('click', () => { PICK = b.dataset.pick; $('goalPick').value = PICK; snippets(); $('snTag').scrollIntoView({ behavior: 'smooth', block: 'center' }); })); + $('goalRows').querySelectorAll('[data-edit]').forEach(b => b.addEventListener('click', () => goalForm(goals.find(g => g.px === b.dataset.edit)))); + $('goalRows').querySelectorAll('[data-del]').forEach(b => b.addEventListener('click', async () => { + if (!await CR.dialog({ title: 'Remove this goal?', text: 'Its pixel stops counting at once. Conversions already counted stay in your reports.', ok: 'Remove', danger: true })) return; + try { await CR.api('/api/my/conversions/goals/' + b.dataset.del, { remove: true }); CR.toast('Goal removed'); load(); } catch (e) { CR.toast(e.message, true); } + })); + } + async function goalForm(g) { + const v = await CR.dialog({ title: g ? 'Edit goal' : 'Add a goal', text: 'One word for what you count, like subscriber or sale. The default value is optional, in US dollars, used when the pixel carries none.', + fields: [{ k: 'name', label: 'Goal name', value: g ? g.name : '', placeholder: 'subscriber', max: 32 }, { k: 'value', label: 'Default value (optional)', value: g && g.value ? String(g.value) : '', placeholder: '0.00', max: 10 }], ok: g ? 'Save' : 'Add goal' }); + if (!v) return; + try { const r = g ? await CR.api('/api/my/conversions/goals/' + g.px, v) : await CR.api('/api/my/conversions/goals', v); if (r.goal) PICK = r.goal.px; CR.toast(g ? 'Saved' : 'Goal added. Its snippets are ready below.'); load(); } catch (e) { CR.toast(e.message, true); } + } + $('addGoal').addEventListener('click', () => goalForm(null)); + $('goalPick').addEventListener('change', () => { PICK = $('goalPick').value; snippets(); }); + document.querySelectorAll('[data-copy]').forEach(b => b.addEventListener('click', () => CR.copy($(b.dataset.copy).textContent))); + // the test loads the real image pixel, the same request a thank-you page makes; it is recorded apart and never counted + $('testBtn').addEventListener('click', async () => { + const px = PICK; if (!px) return; $('testBtn').disabled = true; $('testNote').textContent = 'Sending...'; + let ok = false; try { const r = await fetch('/cv.gif?px=' + px + '&test=1&r=' + Date.now(), { cache: 'no-store' }); ok = r.ok && /^test/.test(r.headers.get('X-LS-Result') || ''); } catch (e) {} + if (!ok) { try { await CR.api('/api/my/conversions/goals/' + px, { test: true }); ok = true; } catch (e) {} } + CR.toast(ok ? 'Test received. Your pixel id works.' : 'The test did not arrive. Try again in a minute.', !ok); $('testBtn').disabled = false; load(); + }); + async function load() { + try { D = await CR.get('/api/my/conversions?days=' + RANGE); } catch (e) { CR.sub('could not load'); return; } + paint(); + } + CR.requireSession(load); +})(); diff --git a/public/assets/cr-shell.js b/public/assets/cr-shell.js index 0c3f36a..0c61dc6 100644 --- a/public/assets/cr-shell.js +++ b/public/assets/cr-shell.js @@ -14,6 +14,7 @@ window.CR = (function () { ['ads', 'Ads', '/ads', ''], ['credits', 'Credits', '/credits', ''], ['reports', 'Reports', '/reports', ''], + ['conversions', 'Conversions', '/conversions', ''], // conversion pixel goals (2026-10-23) ['team', 'Team', '/team', ''], ['wallet', 'Wallet', '/wallet', ''], ['promo', 'Promo tools', '/tools#promo', ''], @@ -25,7 +26,7 @@ window.CR = (function () { ]; // screens not built yet fall back to the classic dashboard pane so nothing is a dead end const FALLBACK = {}; // the classic /my dashboard is retired (2026-10-08); its leftover panes live at /tools - const BUILT = new Set(['links', 'sources', 'pages', 'zones', 'ads', 'credits', 'reports', 'team', 'wallet', 'tools', 'promo', 'training', 'pipeline', 'profile', 'help']); // Training, Pipeline and Profile on the rail, not behind More (Marty 2026-10-11); Help = support tickets (2026-10-16) + const BUILT = new Set(['links', 'sources', 'pages', 'zones', 'ads', 'credits', 'reports', 'conversions', 'team', 'wallet', 'tools', 'promo', 'training', 'pipeline', 'profile', 'help']); // Training, Pipeline and Profile on the rail, not behind More (Marty 2026-10-11); Help = support tickets (2026-10-16) let ME = null, toastT; // Expired session (Marty 2026-10-23: "told me to sign in but never redirected me"): sessions last 24 h, and a screen // left open past that got 'Sign in first.' errors with no way forward. Any 401 from our API, or coming back to a tab diff --git a/public/assets/sources-screen.js b/public/assets/sources-screen.js index 1f73127..8f202fd 100644 --- a/public/assets/sources-screen.js +++ b/public/assets/sources-screen.js @@ -9,7 +9,7 @@ const ago = ts => { if (!ts) return 'never'; const s = Math.max(0, Math.round((Date.now() - ts) / 1000)); return s < 60 ? 'just now' : s < 3600 ? Math.round(s / 60) + ' min ago' : s < 86400 ? Math.round(s / 3600) + ' h ago' : Math.round(s / 86400) + ' d ago'; }; const netOf = s => CAT.find(c => c.key === s.template) || null; const netName = s => { const n = netOf(s); return n ? n.name : (s.template === 'custom' ? 'Custom' : s.template); }; - const EV_LABEL = { join: 'Join', lead: 'Lead', wallet: 'Wallet', purchase: 'Purchase', external: 'Partner-reported' }; + const EV_LABEL = { join: 'Join', lead: 'Lead', wallet: 'Wallet', purchase: 'Purchase', external: 'Partner-reported', goal: 'Any goal (pixel)' }; async function load(keep) { let r; try { r = await CR.get('/api/my/sources'); } catch (e) { CR.sub('could not load'); return; } diff --git a/public/conversions.html b/public/conversions.html new file mode 100644 index 0000000..d81c839 --- /dev/null +++ b/public/conversions.html @@ -0,0 +1,73 @@ + + + + + + +Conversions · LinkSpin + + + + + +
+
+
+

Your goals

+
A goal is something you want counted: a subscriber, a sale, a sign-up. Each goal has its own pixel id. The id is public and safe to paste: it can only count clicks that are yours.
+
GoalPixel idValueCounted
+
+
+
+

Set it up in 3 steps

+
    +
  1. Landing page: paste the landing tag once, before </body>. It keeps the click id on your own site for 30 days.
  2. +
  3. Thank-you page: paste the goal pixel for the goal (the image works anywhere; the script version is surer).
  4. +
  5. Test it: press Send a test conversion below, then click one of your own ads or spin links and finish your own form once.
  6. +
+
Snippets for
+
1. Landing tag
+
2. Goal pixel (image)
+
2b. Goal pixel (script, reads what the landing tag kept)
+
Add &value=19.95 to the pixel to record what the sale was worth. Without it, the goal's default value is used.
+
+
+

Autoresponders and hosted thank-you pages

+
+

If your list provider shows its own thank-you page, you cannot paste the pixel there. Point the provider at a page on your site instead, and put the pixel on that page.

+

Aweber: open your sign-up form, go to its settings, set Thank You Page to a custom page and paste your page's address.

+

GetResponse: in the form or landing page settings, set the thank-you page to a custom URL and paste your page's address.

+

If you cannot change it, the pixel can still count through LinkSpin's cookie or the 24-hour match, just less surely.

+

Forms on your own page: add a hidden field named lsclk and the landing tag fills it with the click id, so your own system can pass it on.

+

Postbacks: a postback set to the event goal (on Links or a traffic source) fires for every goal, with {event} = the goal's name.

+
+
+
+
+

How sure is each count

+
+
Address: the click id was on the thank-you page's address. Kept: the landing tag kept it on your site. Both are exact. Cookie: LinkSpin's own cookie, exact but some browsers block it. 24 h match: same network and browser within a day of the click, a good guess, not proof. Each goal counts once per click, only within 30 days of the click, and only for clicks on your own ads and links.
+
+
+
+
+ + + + diff --git a/public/credits.html b/public/credits.html index ed81059..4516989 100644 --- a/public/credits.html +++ b/public/credits.html @@ -82,7 +82,7 @@ - + diff --git a/public/help.html b/public/help.html index cce11f8..14941f3 100644 --- a/public/help.html +++ b/public/help.html @@ -29,7 +29,7 @@
loading
- + diff --git a/public/links.html b/public/links.html index 14e80a3..f645c12 100644 --- a/public/links.html +++ b/public/links.html @@ -252,7 +252,7 @@ - + diff --git a/public/my.html b/public/my.html index 3bef5fe..5f4e239 100644 --- a/public/my.html +++ b/public/my.html @@ -1008,7 +1008,7 @@ - + diff --git a/public/pages.html b/public/pages.html index 1fb32e5..031848a 100644 --- a/public/pages.html +++ b/public/pages.html @@ -72,7 +72,7 @@ - + diff --git a/public/privacy.html b/public/privacy.html index e2d4db1..e89e161 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -27,6 +27,9 @@

A minimal set: the email you sign up with, a username and any profile details you choose to add (avatar, bio, social links), and, only if you link one, your public wallet address. The links you rotate, the pages you publish, the zones you register, campaign content you create and reports you submit are stored to run the service. We also read on-chain activity that is already public on the blockchain.

Click and impression records

When someone opens one of your spin links or sees a zone on your site, we record the time, the destination chosen, the country, the device type, the referring site and any click id or tracking parameters in the link, plus a daily-salted hash of the visitor that is not reversible to a person. These records power your reports and are kept for the life of the link.

+

Conversion tracking

+

When someone clicks an ad on LinkSpin or InstantAdPay, or a spin link whose owner tracks goals, we give that click a random click id and add it to the address they land on (as lsclk). We keep the click with its time, campaign, country, device type and where it was clicked, plus a one-way hash of the network address and browser that we use only to match a conversion within 24 hours. We do not store the IP address itself.

+

Advertisers who use our landing tag (t.js) keep that click id on their own website for 30 days, in the browser's local storage and a cookie named ls_clk on their site. When the visitor later reaches the advertiser's thank-you page, the goal pixel (cv.gif or cv.js) tells us the goal was reached for that click id, so the advertiser can see how many of their clicks became, say, subscribers or sales, and what each cost. We also set a cookie named ls.clk on our own domain when an ad is clicked, so the pixel can still match where the advertiser's site has no tag. Nothing personal is read or stored by the tag or the pixel: no names, emails or form contents. A conversion only ever counts for the advertiser who owns the click.

Leads on your pages

Email addresses entered on a page you publish belong to you and are shown only to you. We store them so you can download them or forward them to your own autoresponder. Visitors are told on the page who is collecting their email.

What we do not collect

@@ -34,7 +37,7 @@

How we use it

To run your account, serve and measure links, pages and ads, attribute referrals, send service and notification emails (payouts, messages, onboarding), and keep the Platform secure. You can set your email and chat notification preferences in your dashboard.

Cookies

-

We use a session cookie to keep you signed in, a referral cookie to credit the sponsor whose link you arrived through, a click cookie that ties a sign-up back to the spin link that brought you, and a demo cookie that holds a spin link you made before signing in. That is it. No third-party ad-tracking cookies.

+

We use a session cookie to keep you signed in, a referral cookie to credit the sponsor whose link you arrived through, a click cookie that ties a sign-up back to the spin link that brought you, a demo cookie that holds a spin link you made before signing in, a visitor cookie (ls.vid) that lets members show or hide their own ads to people who visited their pages, and the conversion click cookie (ls.clk) described above. The last two can be read when our audience or goal pixel loads on a member's own site. We do not use any other company's tracking cookies, and we do not sell or share these records.

Sharing

Your username and public profile are visible to others by design, and on-chain transactions are public by nature. We share data with infrastructure providers (hosting, email delivery) only as needed to operate the service, with the partner ad network only as impression counts, and when required by law.

Your choices

diff --git a/public/reports.html b/public/reports.html index d827cfd..8116953 100644 --- a/public/reports.html +++ b/public/reports.html @@ -41,7 +41,7 @@

Top links

LinkUniqueClicksConv.

Your best hours

0006121823
-

Conversions

Joins, wallets and purchases matched to a click on one of your links, plus anything a partner reported by postback.
+

Conversions

Joins, wallets and purchases matched to a click on one of your links, plus anything a partner reported by postback. Your own goals (subscribers, sales) and cost per goal are on Conversions.
@@ -89,7 +89,7 @@ - + diff --git a/public/sources.html b/public/sources.html index a0e7c52..7bc2134 100644 --- a/public/sources.html +++ b/public/sources.html @@ -123,7 +123,7 @@ - - + + diff --git a/public/team.html b/public/team.html index 2f6adf1..37731d4 100644 --- a/public/team.html +++ b/public/team.html @@ -37,7 +37,7 @@ - + diff --git a/public/wallet.html b/public/wallet.html index 91eae07..6ded5d0 100644 --- a/public/wallet.html +++ b/public/wallet.html @@ -31,7 +31,7 @@ - + diff --git a/public/zones.html b/public/zones.html index 3e7c958..2b8c43f 100644 --- a/public/zones.html +++ b/public/zones.html @@ -41,7 +41,7 @@ - +