Conversion linkage, LinkSpin side (Marty 2026-11-07, "Yes ship these"): InstantAdPay's sign-ups, wallet links and package purchases on a click count for the click's owner, in one Conversions list. Reporting only: no sponsor, payout, credit or chain path changes.
The landing tag (t.js) adds the kept click id to links to linkspin.app, instantadpay.com and the share domains, also inside a member's own redirect link (Orlando's buttons are go.opgnetwerk.com/go?u=<encoded join link>). Spin and Banner Spin links are left alone and only LinkSpin's own id shapes travel. A spin link or Banner Spin pointed straight at those sites carries lsclk with no goal set up. netconv.js: new partner op 'events' on /api/partner/conv. Append-only ledger DATA_DIR/netconv.jsonl so two app copies cannot overwrite each other, marks.claim plus the ledger keys for once-only, join and wallet once per root click, every purchase by its own key, 30 days from click to event, the first account on a click owns it, the click owner's own account and own clicks kept as tests, each row keeps what the click was so later events survive the hit ageing out of the rotator. Spin events mirror into rotator.conv (replayed on a timer) so per-link counts, sources and placements see them; postbacks fire as for LinkSpin's own conversions. Reports > Conversions lists goals, joins, wallets, purchases, leads and partner postbacks with values, each once; per-link Conv. counts include goals. /join keeps lsclk as well as lsid. Guide, /conversions, privacy and chatbot (CANNED + FACTS) updated; reports.js and join.js tags bumped. The false Pages webhook claim is gone from chatbot.js, join.js and the home page: leads go to the member's list and CSV, or into a pasted autoresponder form. QA: bash qa/run.sh netconv (57 checks, also runs in member). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+37
-2
@@ -2,7 +2,8 @@
|
||||
* <script async src="https://linkspin.app/t.js?px=YOUR_PIXEL_ID"></script>
|
||||
* It reads the click id LinkSpin or InstantAdPay put on the link (lsclk, lsid or clickid in the address), keeps it on YOUR
|
||||
* site for 30 days (localStorage + a first-party cookie, both named ls_clk), copies it into hidden form fields named lsclk,
|
||||
* lsid or clickid, and adds it to links that stay on your site. Nothing personal is read or stored.
|
||||
* lsid or clickid, and adds it to links that stay on your site. Links to InstantAdPay and LinkSpin carry it too, also inside a
|
||||
* redirect link of your own, so a sign-up or purchase there is counted on your click. Nothing personal is read or stored.
|
||||
* It never throws and never blocks your page: every step is wrapped, and it only runs after the page has its scripts.
|
||||
*/
|
||||
(function () {
|
||||
@@ -65,7 +66,41 @@
|
||||
u.searchParams.set('lsclk', id); a.href = u.toString();
|
||||
} catch (e) {}
|
||||
}
|
||||
function onClick(e) { try { var a = e.target && e.target.closest ? e.target.closest('a[href]') : null; if (a) decorate(a); } catch (er) {} }
|
||||
// links to the network (2026-11-07): a bridge page's button carries the click to InstantAdPay or LinkSpin, which report sign-ups
|
||||
// and purchases against it. Also inside a redirect link of the member's own (go.example.com/go?u=https%3A%2F%2Finstantadpay.com...):
|
||||
// only that one parameter is rewritten, every other one keeps its exact encoding. Spin and Banner Spin links are left alone, they
|
||||
// make their own click. Only LinkSpin's own id shapes travel, never another network's clickid. Done on load, again when the page
|
||||
// is ready and at the click, so a page script that rewrites its links first or later does not lose it.
|
||||
var NET = /*ls-net*/["linkspin.app","instantadpay.com","instantadpay.link","ctbgo.com","mylinehq.com"]/*ls-net*/;
|
||||
var OURS = /^(?:[a-f0-9]{10}|[aik][a-f0-9]{11})$/;
|
||||
function netUrl(s) {
|
||||
try { var u = new URL(s); return /^https?:$/.test(u.protocol) && NET.indexOf(u.hostname.toLowerCase().replace(/^www\./, '')) >= 0 && !/^\/(r|c|i)\//.test(u.pathname) ? u : null; } catch (e) { return null; }
|
||||
}
|
||||
function carries(u) { for (var i = 0; i < NAMES.length; i++) if (u.searchParams.has(NAMES[i])) return true; return false; }
|
||||
function addId(s) { var h = s.indexOf('#'), b = h < 0 ? s : s.slice(0, h), t = h < 0 ? '' : s.slice(h); return b + (b.indexOf('?') < 0 ? '?' : /[?&]$/.test(b) ? '' : '&') + 'lsclk=' + encodeURIComponent(id) + t; }
|
||||
function network(a) {
|
||||
try {
|
||||
if (!OURS.test(id) || a.getAttribute('data-ls-skip') != null) return false;
|
||||
var href = a.href, n = netUrl(href);
|
||||
if (n) { if (!carries(n)) a.href = addId(href); return true; }
|
||||
var u = new URL(href); if (!/^https?:$/.test(u.protocol) || !u.search) return false;
|
||||
var parts = u.search.slice(1).split('&'), found = false, changed = false;
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var eq = parts[i].indexOf('='); if (eq < 1) continue;
|
||||
var v; try { v = decodeURIComponent(parts[i].slice(eq + 1).replace(/\+/g, ' ')); } catch (e) { continue; }
|
||||
var inner = /^https?:/i.test(v) ? netUrl(v) : null; if (!inner) continue;
|
||||
found = true; if (carries(inner)) continue;
|
||||
parts[i] = parts[i].slice(0, eq + 1) + encodeURIComponent(addId(v)); changed = true;
|
||||
}
|
||||
if (changed) a.href = href.slice(0, href.indexOf('?') + 1) + parts.join('&') + (u.hash || '');
|
||||
return found;
|
||||
} catch (e) { return false; }
|
||||
}
|
||||
function sweep() { try { var l = document.querySelectorAll('a[href]'); for (var i = 0; i < l.length; i++) network(l[i]); } catch (e) {} }
|
||||
sweep();
|
||||
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', sweep);
|
||||
W.addEventListener('load', sweep);
|
||||
function onClick(e) { try { var a = e.target && e.target.closest ? e.target.closest('a[href]') : null; if (a && !network(a)) decorate(a); } catch (er) {} }
|
||||
document.addEventListener('click', onClick, true);
|
||||
document.addEventListener('auxclick', onClick, true);
|
||||
} catch (e) { /* never break the member's page */ }
|
||||
|
||||
Reference in New Issue
Block a user