Conversion linkage, InstantAdPay side (Marty 2026-11-07, "Yes ship these"): a LinkSpin click stays with the account, and its sign-up, wallet link and each package purchase are reported to LinkSpin. Reporting only: no sponsor, payout, credit or chain path changes; accounts.js only gains a notification after a wallet is linked.

lsreport.js. A click id (lsclk or lsid) arriving on any page is kept in a first-party cookie iap.lsclk, 30 days, last click wins, like the sponsor cookie. The join page also sends its own copy with the code request and verify (the cookie is refused in traffic-exchange frames and never crosses browsers, the 2026-09-29 lesson) and it is remembered per email. It is stored in its own table ls_account_clicks when the account is created or a waiting LinkSpin shell is claimed, on /api/signup, email sign-in and in-game sign-in (a game may pass lsclk; none does yet).

Reports queue in ls_events, whose primary key is the idempotency key (join:<hash>, wallet:<hash>, purchase:<tx>:<log index>), so two app copies in a deploy cannot double a row, and LinkSpin dedupes on the same key. A background loop sends them signed, retrying up to every 5 minutes; a sign-up or a purchase never waits on LinkSpin. The purchase hook runs after the existing ev: claim and its value is the USD price on the chain event. A first purchase finds its buyer through the contract's wallet for that member id, since member_id may not be stored yet. Linked positions count as the account's purchases. Past 30 days from the sign-up nothing is queued (LinkSpin's window is from the click).

Campaigns > Conversion tracking lists everything the member's clicks led to, and joins, wallets and purchases on each campaign row. Guide, privacy page and chatbot (CANNED + FACTS) updated; common.js, join.js and my.js tags bumped.

QA: bash qa/run.sh netconv (54 checks: local InstantAdPay + local LinkSpin + a mock Polygon RPC, a real Purchase log through the real event fan-out, LinkSpin down, two copies racing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-07 07:48:36 -06:00
parent bfbea142b6
commit 03284aa281
36 changed files with 487 additions and 39 deletions
+1 -1
View File
@@ -651,7 +651,7 @@
</div>
</div>
<script src="/assets/common.js?v=20261101th"></script><script src="/assets/welcome.js?v=20261101th"></script>
<script src="/assets/common.js?v=20261107nc"></script><script src="/assets/welcome.js?v=20261101th"></script>
<script src="/assets/admin-kb.js?v=20261020kb"></script>
<script src="/assets/admin.js?v=20261107tg"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-kits.js?v=20261101th"></script>
</body>