From f6621a8e34643acf9378a6b16734f5cab70eef90 Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 22 Oct 2026 16:09:40 -0500 Subject: [PATCH] Page leads count as conversions again; pixel keeps the event name; cookieless pixel hits stop inflating audiences (Marty approved, 2026-10-22) B2: the built-in page form posted an empty lsid (pt.js only filled .lsform, the pasted-form class), so page leads never reached the rotator 'lead' conversion or the postback. The server now fills the hidden lsid at render from ?lsid or the ls.click cookie, the lead POST falls back to the ls.click cookie when the form sends none, and pt.js fills both .ls-form and .lsform as a fallback (cache tag pt.js?v=2). Pasted provider forms get no added field: some providers reject unknown fields, so the lsid only rides along when the member's own form code has an lsid field. B4: /p.gif now stores the pixel's e= event name (lowercase [a-z0-9_-]{1,32}) in a parallel ev map in audiences.json; hits stay plain timestamps, so old rows count, match and prune as before. The audiences list shows counts by event (events for cookie visitors, eventsSoft for 24 h soft keys). B3: a pixel hit with no ls.vid cookie still offers the cookie but is counted under the 24 h IP + user agent key only, not a fresh 30-day visitor id, so a cookie-blocking browser counts once. Test: qa/lsid-pixel.test.mjs (bash qa/run.sh lsid), unit + local end to end on a throwaway data dir. Co-Authored-By: Claude Opus 5.5 --- audiences.js | 28 ++++--- pagerender.js | 2 +- public/assets/pt.js | 4 +- qa/lsid-pixel.test.mjs | 171 +++++++++++++++++++++++++++++++++++++++++ qa/run.sh | 3 + server.js | 14 +++- 6 files changed, 205 insertions(+), 17 deletions(-) create mode 100644 qa/lsid-pixel.test.mjs diff --git a/audiences.js b/audiences.js index 9355f49..1f49fcb 100644 --- a/audiences.js +++ b/audiences.js @@ -5,7 +5,8 @@ // run. Extra audiences come from the pixel tag (