Files
martbost db46fc4a2b Conversion tracking member guide at /conversion-tracking (Marty, 2026-10-24: no training existed for the conversion pixel, live since 10-23)
Same content as InstantAdPay's guide in the pub.css look of /refuel, LinkSpin-first: Control Room > Conversions, spin links add lsclk once a goal exists, the 2 / 2b snippets, report columns (Spent, Clicks, Goals, Rate, Cost / goal), Address / Kept / Cookie / 24 h match, by spin link / page / source, CSV, postbacks on event goal, a Banner Spin banner pointed straight at a page is not matched (point it at a spin link), own AD clicks are tests while a sign-up through your own spin link counts. Flow drawn in HTML/CSS (works at 390 px). conversion-guide.js: copy buttons + new-tab links when framed.
Route + TRAFFIC_PAGES + sitemap; Training entry (catalog/training.json "conversion-guide", group "Track your results"); "How to set it up" link on the Conversions screen. Chatbot CANNED conversions answer + FACTS line point to the guide (KNOWLEDGE_DATE stays 2026-10-24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:19:03 -05:00

28 lines
2.1 KiB
JavaScript

// Conversion tracking guide (/conversion-tracking, 2026-10-24): the Copy buttons on the code examples, and inside a
// traffic-exchange frame (session and sponsor cookies are dropped there) sign-in, join, Control Room and off-site links
// open in a new tab, /join carrying the ?ref= this page was opened with (same rule as refuel-guide.js).
(function () {
function flash(b, t) { var o = b.getAttribute('data-label') || b.textContent; b.setAttribute('data-label', o); b.textContent = t; setTimeout(function () { b.textContent = o; }, 1600); }
document.querySelectorAll('[data-copy]').forEach(function (b) {
b.addEventListener('click', function () {
var box = b.closest('.cg-code'); var pre = box && box.querySelector('pre'); if (!pre) return;
var text = pre.textContent;
var fallback = function () {
try { var r = document.createRange(); r.selectNodeContents(pre); var s = window.getSelection(); s.removeAllRanges(); s.addRange(r); var ok = document.execCommand && document.execCommand('copy'); flash(b, ok ? 'Copied' : 'Selected'); }
catch (e) { flash(b, 'Select and copy'); }
};
try { if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).then(function () { flash(b, 'Copied'); }, fallback); else fallback(); } catch (e) { fallback(); }
});
});
var framed = false; try { framed = window.top !== window.self; } catch (e) { framed = true; }
if (!framed) return;
var ref = ''; try { ref = new URLSearchParams(location.search).get('ref') || ''; } catch (e) {}
ref = String(ref).toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 40);
document.querySelectorAll('a[href]').forEach(function (a) {
var h = a.getAttribute('href') || ''; if (h.charAt(0) === '#') return;
var member = a.host === location.host && /^\/(join|credits|ads|links|sources|conversions|signin|login)(\/|$)/.test(a.pathname);
if (member && ref && a.pathname === '/join' && !/[?&]ref=/.test(a.search)) a.search = (a.search ? a.search + '&' : '?') + 'ref=' + ref;
if (member || a.host !== location.host) { a.target = '_blank'; a.rel = 'noopener'; }
});
})();