Brand database · briefs/nailscience/BRAND.md · source of truth

NailScience — Brand Database (BRAND.md)

NailScience — Brand Database (BRAND.md)

The single source of truth for every durable fact about this brand. Any note David sends

(inventory, suppliers, accounts, contacts, decisions) is filed HERE the same turn it arrives —

before any context compaction. Memory files only POINT here. Never store secrets (tokens, keys,

passwords): reference the env file that holds them. Keep entries dated. Hub renders this file.

Status 2026-10-13: RELAUNCH — kickoff on the new playbook. Retired 2026-06-15; David 2026-10-13: "We will be relaunching trynailscience.com. We will be adopting the new playbook." The existing folder and site are the base — CONFIRMED (David 2026-10-14: "yes"). The index and the plan: briefs/nailscience/RELAUNCH.md. Console lane: nailscience — 7 of 8 kickoff asks answered 2026-10-14 (§6); ns-webhook-crossfire still open.

0 · Identity & entities

FieldValue
Legal entity / ownerNailScience Co. (the name on the logo and the adscalerads client "NailScience Co.", id 1) — legal entity TO CONFIRM
Key people & rolesDavid Sanghera — owner / operator. "Dr. Franks" — the house doctor persona (podiatrist voice of the advertorial and the emails); a composite, never a real person (CL-14), never reports lab results
Support email / phonesupport@trynailscience.com (the Klaviyo sender) · phone TO FILL
Brand relationshipown brand
TeamsNetlify team EcomScalers · Meta BM "DeltaSift" (Liaison – A) in May 2026

1 · Products & SKUs

CodeProductSize / formatUPCFormula / spec sourceSupplier
NS-012-Step Nail Restoration Kit — 3 pens = one month. Step 1 Nail Prep pen (urea + lactic acid + propylene glycol, the softener). Step 2 Maximum-Strength Antifungal pen (25% undecylenic acid + tea tree, oregano, manuka, clove oils)3 ml PP pen 1.1 × 12.5 cm · PE bag 8 × 18 cm · carton 56 × 36 × 21 cmTO FILLcopy brief tools/deep-researcher/runs/nailscience/at-ns/07_copy-brief/response.md · the live PDPLansil Global (Shenzhen Lansil Trading Ltd, support@lansilglobal.com)

✅ FORMULA — CLOSED (David 2026-10-14: "What's on the PDP is what's in the pens"). The pens carry the PDP formula above; the salicylic-acid line on the Lansil quote was the factory's reference formula, not our fill. The Truth Gate's first claim is settled. Undecylenic acid is an FDA OTC antifungal monograph active (21 CFR 333): establishment registration, NDC and a Drug Facts panel are the officer's questions, not a constraint on the first draft (CL-00).

29next store items (acm2): 3 "NailScience™ 2-Step Nail Restoration Kit" · 4 "Fungus Destroyer Pack" · 37 Shipping Protection · 70 Extra Strength. Packages: see §3.

2 · Inventory & supply chain

SKUUnits on handLocation / 3PLLot / mfg dateShelf lifeCOGS (landed)MOQ / reorder lead timeUpdated
NS-01Stock on hand in Shenzhen — enough to relaunch (David 2026-10-14: "Ignore, we have stock in Shenzhen"); units not counted4PX drop-ship from Lansil's Shenzhen warehouse (no US stock) — the May model stands for the relaunch. Lansil Las Vegas 3PL ($1.00 pick/pack) was modelled, never confirmed——3-pen kit $1.97 product + $0.30 pick/pack + $5.44 4PX postage = $7.71 to the customer · 6-pen $9.88 · 9-pen $17.59 (ships as two parcels)3,000 MOQ · quote valid to 2026-05-16 (expired — re-quote)2026-10-13

Notes: quote PDF + screenshot in logistics/nailscience/quotes/; cost models (drop-ship / sea→Vegas / air→Vegas), scaling tiers and the supplier question list in logistics/nailscience/scenarios.json. Lansil Global is also a consulting client (clients/lansilglobal/).

3 · Offer & pricing

The relaunch offer — LOCKED 2026-10-14 (David: "Ladder A is good")

Row (data-qty)Customer nameKits · pensPriceCompare-atPer kitLane
1One Month Supply — 1 Kit (3 pens)1 · 3$29.99$49.99$29.99Shopify ladder
3Buy 2 + Get 1 FREE — 3 Kits (9 pens) · MOST POPULAR · default3 · 9$59.98$149.97$19.99Shopify ladder
5Buy 3 + Get 2 FREE — 5 Kits (15 pens) · BEST DEAL5 · 15$89.97$249.95$17.99Shopify ladder
—Monthly (subscription)1 · 3$24.99 / 30 d—$24.9929next
—VIP (OTO 1, text-only) · Extra Strength (OTO 2) · Shipping Protection (bump)$14.99 → $9.99/mo · $11.99 · $9.9929next, carried over from May pending the OTO review

The BOGO formula (3 kits = 2× the single, 5 kits = 3× the single); compare-at = $49.99 × kits (the May strike per kit). The default row is 3 kits — the three months one nail cycle needs. Guarantee 30-Day Money-Back. Free US shipping.

Economics gate on Ladder A (2026-10-14, Shenzhen drop-ship costs, even tier mix): FIX at a $60 CPA — the average first order $59.98 leaves $40.80, 32% of buyers would have to reorder; the monthly lane pays back only on optimistic retention; PASSES at a CPA under $43.16. David built it anyway ("Ladder A is good") — $43 is the CPA to beat in Phase 7; the gate re-runs on live data in Phase 8.

#### Where Ladder A and the trial live on 29next — campaign 1494 "NailScience Co." on acm2 (built 2026-10-14 late; products/nailscience/build_29next.py owns every id, map = creative/nailscience/29next-map.json)

PackageRidesPriceRole
2 NailScience — Mild Fungus (1 kit) (was Mild Issue (1 kit) 2026-10-17 → 10-25, 1 Kit (3 pens) before)product 3 / variant 2 (sku nailscience) — the May pkg 2 renamed in place$24.99 (since 2026-10-20; $29.99 from the relaunch to then)Ladder A one-kit row (a stray price_recurring 9.99 sits on it, inert — is_recurring false)
10 NailScience — Moderate Fungus (3 kits) (was Moderate Issue 10-17 → 10-25) (was … Buy 2 + Get 1 FREE (3 kits))product 202 / variant 203 (sku nailscience-3kits)$59.98Ladder A default row
11 NailScience — Severe Fungus (5 kits) (was Full Treatment 10-17 → 10-25) (was … Buy 3 + Get 2 FREE (5 kits))product 204 / variant 205 (sku nailscience-5kits)$89.97Ladder A best value
12 Try Before You Buy — Monthlyproduct 206 / variant 207 (sku nailscience-trial-monthly)$0.00 today · $24.99 on day 14 · then $24.99 every 30 days (the order webhook flips the cadence)the trial row / OB-C subscribe lane (plan=tbyb-sub)
13 Try Before You Buy — One Kitproduct 208 / variant 209 (sku nailscience-trial-one)$0.00 today · $29.99 on day 14 · nothing renews (the webhook cancels it)the one-time lane (plan=tbyb-one, a checkout deep link)
6 Shipping Protection $9.99 (bump) · 7 VIP $14.99 → $9.99/mo · 8 Fungus Destroyer Pack $29.99 (OTO) · 9 Extra Strength Upgrade $11.99 (OTO)kept as the May build had them — the bump CONTAINER ships hidden since 2026-05-12 (8ed06a76c, "hide + uncheck Shipping Protection bump for higher conversion rate"; the May call stands, the trial's deselect is the guard behind it); the VIP books as a month/1 $9.99 subscription; the VIP PAGE rebuilt 2026-10-15 (§6)
3 / 4 / 5 — the May 2/3/4-kit packages (qty 2/3/4 on variant 2)legacy, unlinked; a stale `?pkg=345` is rewritten to 10/10/11 by the checkout's head shim

Rules the store taught on 2026-10-14 (why the shape above): one package per product variant per campaign ("Product variant [2] already exists in another package"), product 3 holds exactly one child (no variant attributes — POST /products/3/variants/ UPSERTS that child: it rewrote variant 2's sku/price for a minute before the restore; kit_variant() now self-heals), a package create ignores prices (it comes back at the variant's retail — the builder PATCHes right after), no settable quantity on the admin API, a second attach of the same shipping code is refused and the admin key may not create store-level shipping methods (403) → the store-level method was created in the 29next admin UI on 2026-10-15 22:52 PT (in David's Chrome, on his word: Settings → Fulfillment → Add Shipping Method — "Try Before You Buy Shipping", code tbyb, USD $6.99 per order, everywhere, public; the store's only other method is default) and attached to campaign 1494 by build_29next.py --create as shipping ref 2 @ $6.99 (ref 1 default @ $0.00 stays the ladder's) — the map carries tbyb_shipping_ref: 2, the checkout's trial card data-next-shipping-id="2". Webhook env on the production site (set 2026-10-14 late, set_prod_env.py --apply): NEXT_ADMIN_BASE · NEXT_ADMIN_API_KEY · ORDER_SKU_PREFIX=nailscience (ends the Charm/CellScience crossfire the moment the relaunch build deploys to production) · TBYB_LANES keyed by the two trial package NAMES · TBYB_FULFILL_AS/TAG.

#### The Shopify ladder — shop.trynailscience.com (LIVE 2026-10-15 → DORMANT since 2026-10-21: David, "lets make the checkout like it was on 29next, not shopify" — the store, product, channel and tokens stay; handoff.on: false in the spec; ?co=shopify previews)

David delivered our own app's credentials on 2026-10-15 ("NailScience Checkout" → ~/.shopify/nailscience.env, mode 600, never in git). The house kit ran end to end: tools/shopify_store.py nailscience (read → --create → --shipping → --storefront-token) → tools/shop_handoff.py on the PDP (through build_pdp_extras.py, last before </body>), the home and the collection; spec creative/nailscience/shopify-spec.json, map creative/nailscience/shopify-map.json (no secrets).

StoreNailScience · d65bq7-ih.myshopify.com · primary domain shop.trynailscience.com (DNS → shops.myshopify.com, done) · USD · plan Shopify · Shopify Payments ON (US) · Admin API 2026-07, every scope the kit needs
Open on David's sidetime zone Asia/Manila → America/Los_Angeles (Settings → General) · the Facebook & Instagram and Google & YouTube channels are not on the store (channels today: Online Store, POS, Shop) — ask ns-shopify-finish
Productnailscience-2-step-nail-restoration-kit (10590520705313) "NailScience 2-Step Nail Restoration Kit", option Package — 1 Kit $29.99 / $49.99 · variant 53798793380129 · NS-01_1 (← pkg 2) · 3 Kits $59.98 / $149.97 · 53798793412897 · NS-01_3 (← pkg 10) · 5 Kits $89.97 / $249.95 · 53798793445665 · NS-01_5 (← pkg 11); Online Store only; description = David's subhead + "Three pens per kit · one kit a month · 30-Day Money-Back Guarantee"; image /assets/bundle-1.jpg
Shippingone Worldwide zone (237 countries): Free Shipping on any order ≥ $1 · Standard $6.99 only on a $0 order (the house guard; no gift at launch)
HandoffLIVE on the PDP, home and collection (tracking/shop-handoff.js): a ladder row's checkout link → the Shopify cart permalink carrying UTMs / click ids / _fbp / _fbc as attributes; Buy with Shop Pay under #atcBtn follows the row; ?pkg=2/10/11 → tier; trial lanes (plan=tbyb-*, pkgs 12/13) and VIP stay on 29next; ?co=29next keeps a visit on the 29next checkout; storefront token nailscience-pdp
Proofshop_handoff_check.py 24/24 offline · shopify_matrix.py --quick on staging 16/16 (iPhone WebKit + desktop Chromium: T1–T3 every tier → Shopify with Shop Pay in the express row · P1 Buy with Shop Pay · P2 hidden on the trial row · G1 trial → 29next · H1 ?co=29next · Z zero page errors; tools/qa/results/nailscience-shopify-20261015-0934)

The May 2026 offer (history — what the relaunch replaced)

Item29next pkgPriceStrikePer month
1 Month Supply / 3 pens ("Mild Issue")25289$21.99$49.99$21.99
2 Month Supply / 6 pens ("Moderate Issue", default)25290$39.98$99.98$19.99
3 Month Supply / 9 pens ("Full Treatment")25291$53.97$129.99$17.99
Shipping Protection (order bump)25522$9.993 of 26 May orders
VIP (OTO 1, text-only rule applies)25765$14.99 then $9.99/mo7 of 26 May orders
Extra Strength upgrade (OTO 2)26961$11.997 of 26 May orders
Bundle OTO (/special-offer/bundle/)TO FILL
Candidate1 kit3 kits5 kitsMonthlyGate @ $60Passes underAvg first order leaves
A$29.99$59.98$89.97$24.99FIX (32% must reorder)$43.16$40.80
A, since 2026-10-20$24.99$59.98$89.97$24.99FIX (35% must reorder)$43.16$39.27
B$34.99$69.98$104.97$29.99FIX (17% must reorder)$56.26$50.01
C$39.99$79.98$119.97$34.99PASS (monthly pays back by month 6; first order ≈ break-even)$69.36$59.22

Reference: Crystal Flush / Lunavia / Kerassentials retail $69–$140 per month (copy brief Q17). David picked A (2026-10-14, in chat: "Ladder A is good"). tools/proforma/assumptions/nailscience.json now carries Ladder A (the scratch a/b/c files were deleted); page /nailscience/economics/.

4 · Accounts & IDs (no secrets)

SystemID / handleNotes
Domain(s) / DNStrynailscience.com (apex; www 301 → apex) · quiz.trynailscience.comthehealthreportdaily.com hosted the Dr. Franks advertorial + NS-P2 until 2026-07, then went to the bronze prelanders (commit 84aea4c93); both NS pages are dark → since 2026-10-16 both are served there again at their April URLs (/ = NS-P3, /blog/ranking/ = NS-P2) by tools/deploy-health-report.sh (the SkinScience hub site that owns the domain); their server events go to trynailscience.com/api/capi
Netlify sites (EcomScalers)trynailscience.com = vocal-sunburst-5f0620 · id dd6c30db-30da-4e7f-827d-ff0a12426637 — published deploy 2026-05-20, 2 functions · quiz = wonderful-meerkat-49cae2 · id b7ddc126-97b7-44a0-a457-85a772de5982 (2026-05-17) · Dr. Franks / NS-P2 = dreamy-licorice-eedba8 · id a2bbc9e1-cf74-4df9-937d-2336b8b140fa (no custom domain)Netlify env on the main site: FB_PIXEL_ID · FB_CAPI_ACCESS_TOKEN · GA4_MEASUREMENT_ID · GA4_API_SECRET · NEXT_WEBHOOK_SECRET. No ORDER_SKU_PREFIX. No deploy script yet — the site was last deployed bare
29next store / campaignacm2.29next.store — NailScience's store, SHARED with Charm (campaign 1877, since 2026-09-04) and CellScience (2026-09). Admin key ~/.29next/nailscience.env; the NS campaign key sits in products/nailscience/checkout/nailscience/config.jsWebhook 67 "Order Created" → trynailscience.com/api/order-webhook is ACTIVE (checked 2026-10-13) and the live May-20 function has no brand gate → every Charm and CellScience order fires a NailScience Purchase (filed on Charm as charm-ns-webhook-crossfire). Ask ns-webhook-crossfire
Meta BM · ad account · pixelpixel 1341229411229569 · ad account act_832705320684189 (Liaison – A, DeltaSift BM) — CONFIRMED the same for the relaunch (David 2026-10-14: "Yes same.")CAPI token → Netlify env only. Pattern I ported 2026-05-16; Pattern K (wait for _fbp/_fbc) rolled to live brands 2026-07 — NS was dead, verify · the adscaler system user asu (968334878869352) holds DRAFT / ANALYZE / ADVERTISE / MANAGE here since 2026-10-16 (David assigned it; it had none, so every switch was refused)
Facebook Page (the ads) · April campaignsPage Carol Anne Foster 927552797118674 — every April ad posts from it (the ads' tracking specs) · J&T – Foot Doctor Reveals 120243267906260510 · J&T – Top 5 Rankings 120243267753990510 · J&T – 5 Reasons 120243267606940510 (CBO $50 each, PAUSED since May; the ad sets inside are still ACTIVE)Media plan 2026-10: the four switch-ons (W1 W2 W3 + W4/AD025) go back ON in those campaigns; briefs/nailscience/ad-codes.json backfilled 2026-10-14 (35 codes, nothing renamed on Meta)
People on the ad accountDavid Sanghera · asu (adscaler's system user, every launch and switch of ours) · Fotini Panagiotaropoulou (Power Editor)Read from the activity log 2026-10-30: since 2026-10-19 Fotini paused round one's two campaigns (10-19 07:44 PT), renamed J&T – Top 5 Rankings → 'Prospecting \US \ALL 7DC WINNERS \Ranking page' and ran it 10-22 → 10-26 (W3 / W4 edited and re-reviewed 10-20 / 10-22), and on 10-29 13:02 PT created 'Prospecting \US \Testing \CBO' ($150, 8 image ads) + 'Prospecting \US \BFCM' ($100, 3) on the Top 5 page — outside the media plan. 2026-11-01 01:18 PT: she cut Testing CBO $150 → $30/day and switched BFCM off. Read the activity log before quoting the account's daily total.
GA4 property · measurement id · GTMGA4 G-HND2VE2X2S (API secret in Netlify env) · GTM GTM-P9MSJBP7 on PDP, checkout and both prelander sites — kept as-is (David 2026-10-14: "Yes same.")Charm runs without GTM; NailScience keeps its container
Klaviyo orgNail Science · public RA2aJd · key ~/.klaviyo/nailscience.env · lists Y4EDQu (Email, 54) / SAKJXD / V6PVs9 · flows DRAFT: Welcome Yj86A3 · Cart U2C2B4 · Leads WTPuDZ · sender Dr. Franks <support@trynailscience.com>Bodies live only in Klaviyo (the 9 HTML bodies were never committed); activation gates in the imported record below; no ongoing 29next→Klaviyo sync
adscalerads client · Airtable baseclient id 1 "NailScience Co." · Airtable base TO FILL
Cookie / event prefix_ns_ (_ns_eid, _ns_utms, _ns_landing, _ns_referrer)also used by HumanFrame (legacy fork of this template)
Profit / MER · Stripeprofit/nailscience/config.json (Stripe default 2.9% + $0.30)May 7–31 Meta + orders pulled

5 · Compliance ceiling (the officer's inputs — never a constraint on the first draft, CL-00)

6 · Decisions & taste log (dated, David's verdicts = ground truth)

7 · Asset map

8 · Live surfaces (checked 2026-10-13 · staging added 2026-10-14 · PRODUCTION = the relaunch build since 2026-10-15 11:20 PT)

STAGING (David judges here; noindex header): https://nailscience-staging.netlify.app — Netlify site nailscience-staging · id 9389f064-be0e-4e46-aa38-2a37fb53b9e4 (EcomScalers, created 2026-10-14). Deploys ONLY through products/nailscience/deploy.sh (staging default · --prod = trynailscience.com; hygiene gate + --functions + smoke). Phase 4 build on staging 2026-10-14: the PDP at /products/nail-restoration-kit/ (moved from /; the home takes /; old /?pkg= and /?ob= links 301 to the PDP) with the house radio offer box on Ladder A + the 14-Day Free Trial row (29next package pending), the 30-Day Money-Back Guarantee card (pdp_house), the site footer; the homepage (lane C "Product first", ported from CellScience); /collection/; the seven legal pages at /pages/<slug>/ (one-sided stack rewritten for a topical kit: Product Disclaimer + Shipping overridden, refunds = "send the kit back, even empty"); robots.txt + the sitemap index derived from the pages manifest. Gates: check_compliance.py PASS · readability PASS (PDP FK 5.4, home 2.7) · deploy hygiene PASS. Builders: site_chrome.py · pages_content.py · build_site_pages.py · check_compliance.py · wire_pdp_footer.py · tracking_head.py (GTM) · pagespeed.py + fonts/ · build_pdp_read50.py (the 50+ readability pass — run LAST after any PDP rebuild); copy ledger COPYCHIEF-pdp-r1.md. Rebuild order for the PDP: offer_box_v2.py nailscience <pdp> → pdp_house.py → wire_pdp_footer.py → build_pdp_extras.py (hero pass · ?ob=c · package wiring · paint-first tags · ends with the Shopify handoff) → build_pdp_read50.py → tools/qa/mobile_readability.py products/nailscience products/nail-restoration-kit/ (must read 0 at 375/390); checkout = build_checkout_tbyb.py (folds in build_order_summary.py + build_checkout_read50.py); OTOs = build_oto.py. Proofs after any deploy: verify_tracking.py browser --site <base> · verify_tracking.py webhook --site <base> · tools/qa/shopify_matrix.py --quick · tools/qa/nailscience_tbyb_order.py --lane ladder|sub --base <base> --keep-webhook. Still not wired: the 15-pen bundle render (the 5-kit row shows the 9-pen image); the Shopify ad channels (ask ns-shopify-finish). The trial's $6.99 attach is LIVE since 2026-10-15 23:00 PT (ref 2).

SurfaceURLState
Home · PDPhttps://trynailscience.com (home, lane C) · https://trynailscience.com/products/nail-restoration-kit/ (PDP)LIVE — the relaunch build since 2026-10-15 11:20 PT (paint-first tag boot 12:00): Ladder A radio box + the 14-Day Free Trial row, the ?ob=c column, the hero pass, the 50+ pass, every row → our 29next checkout since 2026-10-21 (the Shopify handoff dormant — ?co=shopify previews it; no Buy with Shop Pay); old /?pkg= and /?ob= 301 to the PDP · the Clinicians' Choice card is OFF since 2026-10-21 (the smaller badge = ask ns-clinicians-badge) · the clinicians chip (board D) under the rating since 2026-10-21 afternoon; the offer box rows carry no struck price / Free Shipping line and no trial row
Checkouthttps://trynailscience.com/checkout/ · staging https://nailscience-staging.netlify.app/checkout/LIVE = the Try Before You Buy stamp (2026-10-15): Ladder A rows on pkgs 10/11/2 (books — the ladder dummy order 20/20 on production), the trial card (pkg 12 / 13 via ?pkg=12&plan=tbyb-sub or plan=tbyb-one), the Total Order Summary, SECRET50, 30-Day everywhere, one hashed CSS bundle, no Swiper, no hero bytes on phones. The trial BOOKS since 2026-10-15 23:00 PT on the $6.99 attach (ref 2): monthly + one-kit 26/26 each on staging, monthly 24/24 on production iPhone (order 104892 — $6.99 today, day-14 $24.99 scheduled, renewals ship free); before the attach 29next refused the $0 first order ("Orders with subscription products require payment."). Shipping Protection hidden since May (8ed06a76c). Since 2026-10-21 the ladder rows check out HERE again (pkg 2 / 10 / 11 — the single dummy order 20/20); the Shopify path is dormant (?co=shopify). · since 2026-10-21 a ?pkg= link collapses the selector to the chosen row ("Your Package · Change") · rows mirror the box since 2026-10-21 afternoon: no struck anchor, no Free Shipping line, no trial pick in the full selector · since 2026-10-22: a ?pkg= arrival shows NO package section (the one-row + Change state lasted a day), and the checkout carries NO order summary (David: "remove this") — nothing on the page states the package or the total
OTOs/special-offer/bundle/ · /special-offer/upgrade/ · /special-offer/vip/LIVE — VIP = the house text-only page (rebuilt 2026-10-15, pkg 7, $14.99 + $9.99/30d); upgrade (pkg 9, $11.99) + bundle (pkg 8, $29.99) = the May pages + the same-origin shim; chain proven on production (accept / skip / skip → thank-you)
Thank-you/thank-you/LIVE — the May page + the shim; ReceiptView only (Pattern D)
Legal/pages/privacy /pages/terms /pages/refunds /pages/shipping /pages/contact /pages/accessibility /pages/medical-disclaimer (pretty paths 301)LIVE (200) — the one-sided stack for a topical kit, 30-Day Money-Back Guarantee
NS-P1 · 5 Reasonshttps://trynailscience.com/blog/five-reasons/LIVE — mirror of prelanders/nailscience/5reasons-v3
NS-P2 · Top 5https://thehealthreportdaily.com/blog/ranking/ (W3 AD024 + W4 AD025's link, /blog/ranking 301s to the slash on the same domain) · copy https://trynailscience.com/blog/ranking/LIVE at the April URL since 2026-10-16 (David: "i need the old prelanders re-deployed to the same URLs that were working before") — prelanders/nailscience/top5-advertorial (30-day since 2026-10-14) staged by tools/deploy-health-report.sh; buttons open the PDP in a new tab with the identity forwarded; proof 41/41
NS-P3 · Dr. Franks advertorial (Foot Doctor Reveals)https://thehealthreportdaily.com/ (W1 AD031 + W2 AD013's link) · copy https://trynailscience.com/blog/foot-doctor/LIVE at the April URL since 2026-10-16 — prelanders/drfranks (its nested old Top 5 twin never ships) staged at the hub site's root (the root's 302 to the SkinScience /investigation/ is gone; no SkinScience ad links to the bare root); buttons → the PDP; proof 41/41
Quizhttps://quiz.trynailscience.comLIVE (2026-05-17 build)
Collectionhttps://trynailscience.com/collection/LIVE since 2026-10-15 (200; the handoff on its ladder rows)
CAPI relay · order webhook/api/capi · /api/order-webhookLIVE — the relaunch functions (SKU gate ORDER_SKU_PREFIX=nailscience, the test-order gate, the TBYB lane map), webhook 67's secret aligned 2026-10-15; probes ALL PASS on production
Attribution runtime/tracking/ns-attribution.js (deferred) + tracking_head.py (MO-Guard → dataLayer → GTM-P9MSJBP7 → pixel init, paint-first)LIVE — browser proof ALL PASS on production (PDP · checkout · trial · VIP · thank-you)
Media plan 2026-10 (the turn-on plan)https://mediaplan-hq.netlify.app/nailscience/ (schedule board: https://mediaplan-hq.netlify.app/nailscience/schedule/)Round four ON from 00:00 Oct 31 (campaign 120250114416430510, $50, AD058–AD062); rounds two + three paused by David Oct 30; round one off since Oct 19 (Fotini)
Launch Center workspacehttps://launch-center-hq.netlify.app/nailscience/registered 2026-10-13
Brand DBhttps://launch-center-hq.netlify.app/docs/nailscience/brand-db.htmlthis file, rendered
Pages manifestcreative/nailscience/pages-manifest.jsonNS-P1 · NS-P2 · NS-CHK · NS-UP1–3

9 · Open questions / asks (console lane nailscience, Needs You tab)

10 · Change log


Imported status records (2026-09-02) — history. The facts were distributed into §0–§10 on 2026-10-13; these records stay as the April–June record.

From memory nailscience_klaviyo_bootstrap_brief.md

NailScience — Klaviyo Bootstrap (Session Brief)

This is the canonical handoff. Read this first. NS Klaviyo was diagnosed virgin/pre-bootstrap 2026-05-19 — there's no built infrastructure to "triage" yet; this session builds it with every HF + WAM lesson already in the playbook so we don't re-discover them.


Scope

IN

OUT


Current NS Klaviyo state (verified 2026-05-19 — empty)

The diagnosis is not "bugs to fix" — it's "infrastructure to build."


Adjacent context (read for orientation, don't touch)


Bootstrap playbook (the actual work)

Phase 0 — Decide commerce integration mode

Phase 1 — Wire backfill for NS

Extend tools/29next-to-klaviyo/backfill.py BRANDS dict (currently line ~99–106), filling the commented placeholder:

```python

"nailscience": {

"next_admin_base": "https://acm2.29next.store/api/admin",

"klaviyo_env_file": Path.home() / ".klaviyo" / "nailscience.env",

"next_env_file": Path.home() / ".29next" / "nailscience.env", # needs to be created

"default_list_id": "Y4EDQu", # Email List

"checkout_url_host": "trynailscience.com", # or the actual 29next checkout host

"internal_email_domains": ["trynailscience.com", "ecomscalerslimited.com"], # confirm w/ David

},

```

Phase 2 — Build segments with NATIVE METRICS (NOT properties)

The single most important lesson from the HF triage: the original HF bootstrap gated segments on properties['29next_orders_count'] / 29next_user_type / 29next_total_spent — these are written ONLY by the ongoing sync and FAIL SILENTLY (events keep flowing, segment quietly stops growing). The Klaviyo metric Placed Order is native (fired by the integration) and works regardless.

Build NS segments natively from day one — don't repeat the property-gated mistake:

tools/29next-to-klaviyo/create_segments.py currently uses the OLD property-based pattern — update it before running for NS (or write a NS-specific bootstrap script using the native-metric pattern). See klaviyo_segment_api_skill.md for the corrected pattern + authoritative segment schema.

Phase 3 — Build popup + welcome flow (HF pattern)

Mirror products/humanframe/shoulder/index.html markers [33b]/[35]/[37] in the NS PDP. Property stamp properties: { ns_signup_source: 'pdp_exit_popup' }; segment NS Popup Captures matches on equals. Welcome flow triggers on that segment, 5-min delay, plain-text-personal E1 (Maria-equivalent named sender — pick the NS persona).

Producer/consumer check (HF lesson): the popup property KEY and the segment property KEY must match EXACTLY. Verify before flipping NS_EMAIL_POPUP_ENABLED=true.

Phase 4 — Build the cascade / recovery flows

HF Cart (4-day akemi, 83% RECOVER83) + Leads (4-day akemi, 88% RECOVER88 with full-akemi education body) — same shape. WAM cascade (#02–#05 4-flow funnel-stage cascade, flat 20% WELCOME20) — alternative shape. Pick the one that fits NS's offer ladder.

Apply ALL these hard rules from day one:


HARD RULES — apply throughout (do not re-discover)

1. Klaviyo Liquid URL-encode filter = urlencode, never url_encode. One bad filter fails the WHOLE template render silently — the HTML looks perfect, only POST /api/template-render/ surfaces the error.

2. Verify every email template via POST /api/template-render/ — reproduces Klaviyo UI Preview. Visual / GET inspection does NOT catch render-breaking Liquid. Same class as "verify segments by membership size."

3. Verify segment edits by MEMBERSHIP SIZE, not HTTP 200 alone. A schema-valid def can be semantically empty (HTTP 200) — GET /segments/{id}/profiles/?page[size]=100 after a ~60–90s recompute wait and assert sane count.

4. Klaviyo not-equals excludes profiles where the prop is UNSET. To "exclude only a tagged cohort, keep the unset cohort," OR an existence filter: {conditions: [{type:profile-property, ..., filter:{type:"existence",operator:"not-set"}}, {type:profile-property, ..., filter:{type:"string",operator:"not-equals",value:"X"}}]}.

5. Segment defs are PATCH-able in place (PATCH /segments/{id} → 200, keeps id, no flow re-trigger needed). Flow content is NOT — PATCH /flows/{id} 400s on definition; only status+name mutable → flow content changes = delete+recreate.

6. Segment defs CANNOT reference other segments. profile-group-membership.group_ids accepts LIST ids only ("Group does not exist" error on segment ids).

7. profile-filter timeframe: flow-start ≠ alltime. flow-start = exit-on-new-conversion (count from flow entry); alltime = exclude-prior-converters (count over all history). Discount/scarcity recovery flows almost always want alltime — flow-start lets past customers RE-enter the deep-discount flow if they start a new checkout.

8. Flow create schema: actions need temporary_id + links:{next} chaining + top-level entry_action_id. A time-delay with unit ∈ minutes/hours must NOT include delay_until_weekdays/delay_until_time (GET echoes them but create 400s — strip when unit != 'days').

9. Recreate verification = render-gate + structural parity. Before deleting the old flow, assert the new flow's triggers, profile_filter, action-type sequence, delay values, and subjects all == the saved old def — render-OK alone doesn't prove faithful chaining/timing.

10. Honest-discount HARD RULE: any code referenced in any send must be REAL in 29next/Shopify with a real expiry. False codes destroy the list. Placeholders OK in DRAFT; replace with real codes before activation.

11. /usr/bin/curl -g (or --globoff) for any Klaviyo URL with [ ] (fields[…], additional-fields[…], page[size]). Python stock urllib has no CA bundle → shell to /usr/bin/curl.

12. Read the OpenAPI (https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable.json) for any unfamiliar schema — components.schemas.ConditionGroup for segment conditions, FlowCreateQuery+FlowDefinition+SendEmailAction+TimeDelayAction+Link for flow create, AlltimeDateFilter/SinceFlowStartDateFilter/ExistenceOperatorExistenceFilter for the timeframe/existence shapes. Brute-probing wastes hours; the API's "invalid field type" 400s never list valid values.

13. Klaviyo metrics list endpoint quirk: /metrics/?page[size]=100 may silently return 0; use /metrics/ (no params) or direct GET by id. Same for /flows/ — list may return 0 even when flows exist; if you know specific ids, GET directly.

14. MutationObserver HARD RULES apply to any NS PDP popup code — never write to the DOM inside a callback without a guard flag; split control listeners (close/X/Esc/overlay) from trigger listeners (exit-intent/dwell) so teardown() doesn't nuke close handlers. See CLAUDE.md mandatory checks + the HF popup close-bug fix d77a443.

15. Klaviyo Client Subscribe API returns 202 even if target list is deleted — failures are silent. Before deleting any list, grep-audit ALL references (popups, flow triggers, segment defs, scaffold scripts).

16. Offer-ladder collision check is REQUIRED whenever you change any segment definition that's a flow trigger. Re-run the suppression analysis; for single-consumer trigger segments, suppression goes ON the SEGMENT (in-place PATCH, no flow rebuild) + honest rename. See klaviyo_segment_api_skill.md "Offer-Ladder Lesson."

17. "Powered by Klaviyo" branding is plan-dependent — Klaviyo auto-appends it to delivered emails on free/non-paid plans. Removable in Account → Settings → Branding on paid plans. Verify before flipping any flow live; a "Powered by Klaviyo" badge breaks plain-text-personal voice instantly.

18. Double-opt-in on the capture list holds the profile pending until confirmation — the property may not persist + segment may not fire until confirmed. Verify the NS Email List Y4EDQu opt-in setting before flipping the popup live.


Credentials + environment


Cross-references


First actions for this session

1. Read this brief (you just did).

2. Read humanframe_klaviyo_status.md — the playbook you're about to apply, plus what NOT to repeat (the property-gated segment trap, the flow-start filter trap, the url_encode render-bug trap, the popup close-bug trap, etc.).

3. Read klaviyo_segment_api_skill.md — authoritative segment schema; apply native-metric pattern from segment #1.

4. Confirm with David:

- NS commerce backend: 29next (acm2.29next.store) or also Shopify?

- 29next admin token availability (need ~/.29next/nailscience.env).

- NS brand voice / sender persona for emails (HF used "Maria, HumanFrame Support"; WAM used "WAM!™ Mints / support@wammints.com" — what's NS?).

- Offer ladder: what discount codes are real in 29next/Shopify today? (Honest-discount HARD RULE — no flow ships with placeholder codes.)

5. Then start Phase 1: extend backfill.py BRANDS dict for NS, dry-run, review.


Hard discipline (apply throughout)

From memory nailscience_klaviyo_status.md

Status (last updated 2026-05-20): Bootstrap COMPLETE + copy final — 3 flows DRAFT (CURRENT ids Welcome Yj86A3 / Cart U2C2B4 / Leads WTPuDZ). Codes WELCOME20/RECOVER83/RECOVER88 w/ 13-cap; bodies at FK ~7; Dr. Franks voice; dashboard wired. NS work UNCOMMITTED (David: skip git). Awaiting David's 29next code creation (both RECOVER capped at 13) + Klaviyo settings before flip-live.

NS Klaviyo went from virgin → fully bootstrapped in one session. Backfilled 53 profiles + Placed Order/Started Checkout metrics from 29next; built 4 native-metric segments; drafted + shipped 3 flows (Welcome / Cart / Leads) all DRAFT with render-verified templates. Only thing between current state and LIVE = David creating the 3 discount codes in 29next per honest-discount HARD RULE.


Klaviyo account

Lists

idnamemembers
Y4EDQuEmail List (popup/welcome target)54
SAKJXDPreview List1
V6PVs9Text Messaging List0

Native commerce metrics (created 2026-05-19 by backfill)

idnameintegration
S7mTbVPlaced OrderAPI (from backfill, ongoing via re-runs)
UPiQy6Started CheckoutAPI
—Fulfilled OrderNOT created yet (no order-fulfillment events being pushed; non-blocking for Cart/Leads; needed only if you build a Review/UGC post-purchase flow like WAM #08)

Plus 20 Klaviyo-native engagement metrics (Opened/Clicked/Bounced Email + SMS variants + Active on Site).

Segments (4) — all NATIVE-METRIC (HF property-gated bug not repeated)

idnamedefmembers
Y6Q6gcNS Customers (have ordered)Placed Order S7mTbV count > 0 (1825d)30
RZU8LJNS Leads — recovery (no order, excl. popup arc)count == 0 AND OR(ns_signup_source not-set, not-equals 'pdp_exit_popup')22
Vw8DsiNS VIP Candidatescount > 3 AND sum > $299.99 (1825d)0 (legitimately — early store)
Vrvp6UNS Active Cart AbandonersStarted Checkout > 0 AND Placed Order == 0 (30d)14

Plus Klaviyo defaults (Engaged 30/60/90, New Subscribers) — left alone.

Popup-arc carve-out baked in from day 1 even though no popup is built yet — when one is built and stamps ns_signup_source=pdp_exit_popup, the Leads flow correctly excludes those captures without any segment edit. Saves the HF mistake we'd have re-made.

Flows (3, all DRAFT) — ⚠️ CURRENT IDs (rebuilt 4× this session — see history)

Flows were delete+recreated 4 times as copy evolved (each recreate = new flow id + new clone ids; standalone seeds were PATCHed in place and REUSED — they never changed id). Use ONLY the CURRENT row.

CURRENT idtriggerprofile_filtercadenceclones (current)
WelcomeYj86A3list Y4EDQu (Added to Email List)nonedelay 5m → E1VTFasV
Cart Abandon (4-day, akemi, 13-cap)U2C2B4metric UPiQy6 Started CheckoutPlaced Order S7mTbV count == 0 (flow-start — NS Cart still recovers returning customers re-abandoning; the alltime exclusion is only for HF-style once-only deep launch)delay 2m → D0 → 1d → D1 → 1d → D2 → 1d → D3TpAXYr/SLzVmN/Y9RzTf/XwQxgC
Leads (4-day, akemi, 13-cap)WTPuDZsegment RZU8LJPlaced Order count == 0 AND Started Checkout count == 0 (flow-start, both as exit)D0 immediate → 1d → D1 → 1d → D2 → 1d → D3SFWF2q/WgNs3n/S4VCpM/VDMpqK

Standalone seed templates (urlencode-clean; PATCHed in place across all rebuilds, ids stable): Welcome SksDTc; Cart VL3Udn/RtxQep/UkKihk/XQXNWU; Leads X9jvYT/X4GfDv/WY4Zi7/V6ZRse.

Rebuild history (superseded ids, all DELETED — do not reference): (1) initial build Welcome WNNuBj / Cart YwB7Lq / Leads XNWNNp (codes WELCOME15/RECOVER25/RECOVER30); (2) code swap to HF-naming Welcome WaQrSU / Cart Svmqwy / Leads XaYL5Y (WELCOME20/RECOVER83/RECOVER88); (3) 13-cap framing Cart RqHPJX / Leads WCJXzC (Welcome unchanged WaQrSU); (4) 7th-grade tighten → CURRENT Yj86A3/U2C2B4/WTPuDZ.

Copy state (CURRENT): codes WELCOME20 (20%, 14d, NO cap — soft welcome) / RECOVER83 (83%, 13-cap) / RECOVER88 (88%, 13-cap, separate pool) — HF naming per David. HF-parallel "13 launch codes" scarcity framing across all 8 Cart+Leads bodies ("we just launched the list-only program, capped at 13"). All 9 bodies tightened to FK grade 2.2–4.5 (7th-grade target, David). Dr. Franks voice throughout.

Sender: Dr. Franks / support@trynailscience.com (reply-to same). Smart Sending on. All 9 clone templates render-gated via POST /api/template-render/ — passed before flow creation; re-verified after.

Voice + brand

⚠️ ACTIVATION GATES (David's, before flipping draft→live)

1. Create 3 real discount codes in 29next (acm2) — HF naming (David):

- WELCOME20 — 20% off first order, 14-day expiry, NO usage cap (soft welcome, no scarcity claim)

- RECOVER83 — 83% off cart recovery, Usage Limit = 13 (13-cap copy is in the bodies), ~5-day expiry

- RECOVER88 — 88% off leads recovery, Usage Limit = 13 (separate pool from RECOVER83), 7-day expiry

Honest-discount HARD RULE + 13-cap extension: the bodies say "13 launch codes, first come first served." If the codes are NOT capped to 13 redemptions in 29next, the scarcity claim is false the moment a 14th person redeems. Cap BOTH RECOVER codes to 13. Body copy refers to specific %; codes must match.

2. Confirm 60-day money-back guarantee is the live policy (drfranks advertorial says 30d; trynailscience.com prelanders say 60d — Cart D2/D3 + Leads D2/D3 reference 60). If wrong, swap in bodies.

3. Klaviyo account settings (Account → Settings):

- Account default sender / from-name (don't ship with default placeholder)

- Klaviyo branding ("Powered by Klaviyo" footer) — plan-dependent; if on free, it appears in delivered emails and undermines Dr. Franks plain-text-personal voice. Remove on paid plan.

- Account address / footer postal address (CAN-SPAM requires a physical address in commercial emails).

- Email List Y4EDQu double-opt-in setting — if ON, Welcome trigger may silently never fire (HF lesson). Verify OFF or that property persists pre-confirmation.

4. Domain authentication for trynailscience.com (DKIM/SPF/DMARC via Klaviyo Settings → Domains and Hosting). Required for Primary-tab deliverability.

After all 4 gates clear: PATCH /api/flows/{Yj86A3|U2C2B4|WTPuDZ}/ with attributes.status: live and they start sending.

Dashboard (Email J&T) — NS wired 2026-05-19

⚠️ Git state (2026-05-20) — NS work UNCOMMITTED by David's choice

Rebase/CMPD was attempted but origin/main is 1013 commits ahead with 2 months of newer WAM development. My 17 May-era commits (HF+WAM email) hit deep conflicts on ~13 WAM cascade bodies (main did ™→® migration + honey/lemon/ginger-flavor-not-ingredient rule + relative-SVG vs my Klaviyo-CDN-PNG image hosting). WAM cascade is LIVE → not force-resolved. David chose "skip git entirely — just Obsidian + Skills." So: NS bootstrap is on-disk UNCOMMITTED (backfill.py NS BRANDS entry + 9 NS bodies + 2 NS manifests + dashboard app.js/index.html). Rebase aborted cleanly, stash popped, tree restored to pre-attempt state. My unique WAM 08/09 bodies are NOT on origin/main (would be lost in a take-theirs rebase) — flagged for the eventual reconciliation pass. NS files are all-new (zero main conflict) so committing them later is low-risk; the WAM/main divergence is the real reconciliation project, deferred.

What's NOT built (deferred / out of session scope)

Backfill ongoing-sync — CRITICAL OPEN ITEM

The backfill ran once (2026-05-19, --since 365d --include-carts --apply). Without ongoing sync, new orders + new started-checkouts after this run will NOT land in Klaviyo → Cart flow won't trigger on real-time abandons + segment memberships go stale.

Two paths to fix:

Path (a) is the proven HF pattern — recommend until/unless 29next webhook integration is wired.

Repo state (UNCOMMITTED — 12 NS/dashboard files on disk, David chose skip-git 2026-05-20)

When David does commit (his call — deferred because the branch is 1013 behind with LIVE-WAM conflicts, see Git state section): surgical git add ONLY these 12 files — NEVER git add -A (the tree also holds someone else's SkinScience bronze-chews work + hook-dirty creative/dashboard/index.html, both must stay out). NS files are all-new (no origin/main collision) so they can even land on a fresh branch off current main without the WAM rebase swamp. Klaviyo flows are already built via API (not file-deploy), so no deploy step for NS regardless.

Cross-references

HARD RULES re-applied (kept here for the next NS-Klaviyo session so they're at hand)

1. Liquid URL-encode filter = urlencode (no underscore). One bad filter fails the WHOLE template render silently.

2. Verify every Klaviyo template via POST /api/template-render/ — visual inspection does NOT catch render-breaking Liquid.

3. Verify segment edits by MEMBERSHIP SIZE, not HTTP 200 alone.

4. Klaviyo not-equals excludes profiles where the prop is UNSET. Use OR(existence:not-set, not-equals X) to keep the unset cohort.

5. Segment defs PATCH-able in place; flow content NOT — flow change = delete+recreate (DRAFT is safe; LIVE needs create-before-delete to not drop in-flight profiles).

6. Segment defs CANNOT reference other segments. profile-group-membership.group_ids = LIST ids only.

7. flow-start filter = exit-on-new-conversion. alltime = exclude-prior-converters. Discount/scarcity recovery flows usually want alltime (HF Cart at 83% did; NS Cart at 25% uses flow-start because moderate-discount cart should still recover returning customers re-abandoning).

8. Flow create: actions need temporary_id + links.next + top-level entry_action_id. Minutes/hours time-delays must NOT include delay_until_weekdays/delay_until_time (only days-unit).

9. Render-gate + structural parity before deleting old flow on a rebuild.

10. Honest-discount HARD RULE: every code in every send must be REAL in 29next/Shopify with a real expiry.

11. /usr/bin/curl -g for [ ] in URLs. Python stock urllib has no CA bundle → use curl.

12. Read the Klaviyo OpenAPI (raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable.json) for schemas; don't brute-probe.

13. Klaviyo metrics list endpoint quirk: /metrics/?page[size]=100 may return 0; /metrics/ no-params returns all. Same for /flows/ — direct GET by id is reliable.

14. Klaviyo Client Subscribe API returns 202 even if list deleted → silent fail. Grep-audit before deleting any list.

15. Before any Netlify deploy: verify siteId via GET https://api.netlify.com/api/v1/sites/{siteId} before AND after.

16. No HF/WAM/NS env contamination: source the right ~/.klaviyo/{brand}.env explicitly; verify via /accounts/ org name before any write.

From memory nailscience_tracking_status.md

⛔ DEAD PROJECT as of 2026-06-15 (David)

NailScience is retired — do not propose or do NS work (no shadow-event rollout, no attribution changes, no maintenance). Kept for reference / template lessons only (same as BuzzerBeater). The Pattern-I / webhook history below is historical.

Status: Pattern I parity + webhook reactivation shipped (as of 2026-05-16, commit 0eb53cc)

2026-05-16 incident + fix (READ THIS FIRST)

NS lost ~1 week of Purchases (Ads Manager empty). Two root causes:

1. 29next "Order Created" webhook (store acm2.29next.store, webhook ID 67, target https://trynailscience.com/api/order-webhook, secret 1ef14a260093) was Inactive. Auto-disabled by 29next's circuit breaker after the 2026-05-11 fix's resends fired before the function deploy propagated. Inactive = 0 events / 0 errors / no event logs (deceptively "clean"). Reactivated via Update form. Re-check this webhook's Active badge regularly — it has flipped Inactive twice now.

2. Pattern I never ported to NS (deferred 2026-05-11). NS prelanders forwarded _ns_eid (wrong param name; destination reads eid_in) and NO _fbp/_fbc; syncCheckoutLinks in template/pdp/02_ecom/index.html stripped all params → 29next "No attribution found" on every order → low-EMQ Purchases. Fixed: ported HF Pattern I (commit 0eb53cc) — COOKIE_TO_URL in 3 NS prelanders (5reasons-v3, top5-advertorial index+index2) + eid_in/fbp_in/fbc_in inheritance in ns-attribution.js (canonical products/nailscience/tracking/ + 6 synced copies) + param-preserving syncCheckoutLinks in canonical template/pdp/02_ecom/index.html (overlay-mirrors to products/nailscience/index.html — do NOT edit the latter directly).

2026-05-19 amendment — Purchase over-count audit (commit c88b6a01)

David reported: "Purchase pixel firing more times than orders" across both brands. Audit found two in-code over-count vectors on NS (mirror of HF):

2026-05-19 evening — first-touch attribution capture (commit f8aacf7a)

Order #102147 (Sheri Fairbairn, $39.98, Visa) shipped "No attribution found" — investigated to a brand-new customer with a 3-week-old _fbp from a prior untracked visit, returned organic-to-apex today. Pattern I correctly had nothing to forward. To widen attribution coverage for the next return-organic / branded-search customer, added first-touch persistence + injection:

Doesn't fix #102147 (cookies were never tagged — both her Apr 29 first touch AND today's conversion were untracked). Catches returning customers whose original visit WAS tagged + organic-search → apex entries (Google/Reddit/etc.). NS-prefixed cookies shared HF+NS — legacy namespace from HF being forked off the NS template, not worth renaming live cookies. Doctrine codified in SKILL Pattern H "First-touch capture for organic / direct-to-apex visitors" with the hard rule: _fbp timestamp older than the customer's account age = returning-organic, NOT a regression.

Full audit recipe + Vector 1/2/3 doctrine codified in SKILL Pattern H "Purchase fire-once-per-order discipline + the three over-count vectors". Grep recipe: ev=Purchase (must be 0 hits), 'event': *'transaction' (must be 0 hits on upsell pages), trackEvent.*purchase (each hit must carry event_id: 'purchase_'+orderId).

2026-05-19 — NS PDP DECOUPLED from template/pdp/02_ecom (David directive)

The compliance-footer rollout from 2026-05-14 (commit 1294e21, 7 legal pages + PDP footer wiring + Netlify/Vercel redirects) silently broke on 2026-05-16 when commit 0eb53cc (the Pattern I attribution port) re-copied template/pdp/02_ecom/index.html → products/nailscience/index.html. My footer wiring + link-color CSS lived only in the overlay; the canonical was never updated, so the re-copy restored the placeholder <li>All Products</li> / <li>Privacy</li> / etc. items. Live site bled the broken footer for ~3 days before David caught it on 2026-05-19.

David's call (2026-05-19): "I don't like that NS is coming from the template. It should be coming from its own folder."

Resolution: products/nailscience/index.html is now the NS PDP source of truth in its own folder. The template/overlay relationship is broken. Edit NS directly. Never cp template/pdp/02_ecom/index.html products/nailscience/ — it will clobber NS-specific work (compliance footer wiring, link-color CSS, ?pkg= handoff hardening, Pattern I attribution, sentinel comments). The earlier 2026-05-16 amendment line — "overlay-mirrors to products/nailscience/index.html — do NOT edit the latter directly" — is now REVERSED. The template stays as a clean starter for future brand launches; NS evolves independently. A sentinel HTML comment <!-- NS-CANONICAL: ... Do NOT regenerate from template/pdp/02_ecom/index.html --> lives above the footer block as an in-file reminder.

This decoupling is documented in skills/base-template-1/SKILL.md "Decoupled instances" section and in skills/compliance-footer/SKILL.md "Gotchas" → "Template/overlay clobbering (the NS trap)".

Status (historical): Full attribution stack live across all 3 NS surfaces, PageView dedup fix shipped (as of 2026-04-17)

NailScience prelander map (IMPORTANT — do not confuse with prelanders/nailscience/)

The NailScience funnel has two live prelanders living at the top level under prelanders/:

CRITICAL DEPLOY GOTCHA — missing .netlify/state.json

Both NS prelander dirs historically had NO .netlify/state.json file. Running netlify deploy --prod from an unlinked dir falls back to whatever site is globally linked in the CLI, which can push prelander content to the wrong site (happened 2026-04-15 — both prelander deploys landed on shoulder-rejuvacare.netlify.app, shoulder had to be rolled back via netlify api restoreSiteDeploy).

Always deploy prelanders with explicit --site=<site-id> flag:

```

netlify deploy --prod --dir=. --site=a2bbc9e1-cf74-4df9-937d-2336b8b140fa --functions=../../shared/functions # drfranks

netlify deploy --prod --dir=. --site=b7ddc126-97b7-44a0-a457-85a772de5982 --functions=../../shared/functions # quiz

```

.netlify/state.json files are now written in both dirs (gitignored, but persist locally). Still, prefer the explicit --site flag as belt-and-suspenders.

custom: CAPI dedup fix (commits e8bcd33 + 89dc43a, 2026-04-15)

The trackEvent() helper sends custom:<name> to fbq('trackCustom', <name>, ...) which strips the prefix client-side, but the CAPI payload was passing custom:<name> through literally — Meta dedup matches on (event_name, event_id) so every custom event was double-counting. Fix strips the custom: prefix in the CAPI payload builder (~line 287 of ns-attribution.js). Shipped to all 3 NS copies + both BB prelander copies (bb-attribution.js had the same bug, fixed in 788cc24).

Earlier status (2026-04-14)

GTM container Version 2 published live with full GA4 measurement stack. Real IDs are in place (GTM-P9MSJBP7, G-HND2VE2X2S, FB Pixel 1341229411229569). GA4 GTM Setup skill created. Persistent device-level external_id deployed across all 3 NailScience attribution.js files (2026-04-14).

Why: GA4 is the measurement backbone for performance marketing — needed before scaling paid ads. The external_id layer adds ~19% median EMQ lift per Meta's own diagnostic, and is required to hit the 8.0+ EMQ target on Purchase events.

How to apply: Use the GA4 GTM Setup skill for new product launches (measurement plane) and the new Attribution Stack & EMQ Boost skill for the JS runtime layer (skills/attribution-stack/SKILL.md).

What's live

Still pending

1. GA4 property config — mark key events as conversions (begin_checkout, add_payment_info, generate_lead, purchase, view_item), create 4 custom audiences, link Google Ads, review enhanced measurement

2. GTM Preview mode testing — verify events fire on PDP and checkout

3. Monitor NS pixel Event ID coverage climb — 2026-04-17 PageView dedup fix (commit 493883e) deployed; Meta Events Manager → Data Sources → Deduplication keys should climb 49% → ≥75% over 24-48h rolling

4. Validate external_id end-to-end — Pixel Helper should show external_id in advanced matching, CAPI requests should send 64-char hex external_id (NOT raw ns_<uuid>), Events Manager → Test Events should show external_id contributing to EMQ

PageView dedup fix (2026-04-17)

Same bug as BuzzerBeater (commit 4fbf9b8): raw fbq('track','PageView') in every HTML snippet after fbq('init') fired browser PageViews WITHOUT eventID — Meta had nothing to match against the server CAPI PageView, so Event ID coverage was stuck at ~49%.

Fix: removed raw call from all 7 NS HTML snippets (PDP, checkout, thank-you, special-offer/bundle, special-offer/vip, drfranks prelander, quiz prelander) and added Universal PageView block at end of ns-attribution.js. Thank-you page skipped via NS.pageType === 'thank_you' guard (GTM fires Purchase there, no Pixel base snippet).

Shipped to all 3 ns-attribution.js copies byte-identical (MD5 9a7061f0b2d82cc6e54a14a41656f566):

Deployed to 3 NS Netlify sites. Verified live — 0 raw fbq('track','PageView') on any production URL; /api/capi returns 204 on trynailscience.com.

CAPI env vars (confirmed set 2026-04-17)

The CAPI function auto-activates providers based on env vars. All 4 are set on trynailscience.com:

POST /api/capi returns 204 with successful relay to both Meta and GA4.

Critical 29next SDK details (researched from SDK source)

Critical CAPI gotcha (also documented in attribution-stack skill)

Rendered 2026-11-16 from the git-tracked file. Edits happen in the repo (Claude files every fact David sends the same turn); this page is the read view.