# LAS Quiz — Progressive Tracking Spec (for Ethan) *Repo: `ethananchorworks/las` · file: `index.html` · goal: capture every question answered even if the visitor abandons, plus start/completion — instead of one POST at the end.* Today the quiz sends **one** webhook, only from `buildResults()` (the results page). Anyone who abandons sends nothing — not even the name/email/phone they already typed. Three changes fix that. Please keep field **keys in `snake_case`** to match the existing `las_*` fields. --- ## Task 1 — Capture the lead the moment the first form is submitted (highest priority) When the visitor submits the **contact form** (name/email/phone), immediately POST to the GHL webhook — don't wait for the results page. - POST to: `https://services.leadconnectorhq.com/hooks/OwJn0vZV9wqqxHFqyC68/webhook-trigger/34421c83-74c5-4b7b-a9ea-a32a7760e71e` - Payload: `firstName, lastName, email, phone, las_source:"Local Authority Score", las_started_at:, las_completed:false, las_last_question_reached:0` - Keep the existing hidden-iframe POST method (no page navigation). - **Result:** an abandoner is now a captured lead in GHL. GHL upserts on email, so this same contact gets enriched by later POSTs (no duplicate). ## Task 2 — Send progress as they answer (partial capture) On **each** question answered (the code already advances in `nextQ()` / the auto-advance timer), POST an incremental update to the same webhook: - Payload per answer: `email` (as the stable key), `las_q0N_:`, `las_last_question_reached:` — reusing the existing field names `las_q01_trucks … las_q16_context` (16 questions). - Debounce/queue is fine; GHL upsert means each POST just updates that contact. - **Result:** even a half-finished quiz leaves `las_q01…las_q0N` filled + how far they got. ## Task 3 — Fire analytics events (start / per-question / complete) Add a `dataLayer` push (GTM) on each of these — so GA4 + the dashboard see the funnel, and so you can measure drop-off per question: | When | Event name | Params | |---|---|---| | Contact form submitted | `las_quiz_started` | `lead_id` (email or a generated session id), utm_* | | Each question answered | `las_question_answered` | `question_number`, `question_slug`, `answer`, `lead_id` | | Results page reached | `las_quiz_completed` | `lead_id`, `las_score`, `las_grade`, `las_stage`, `las_archetype` | Then on the final `buildResults()` POST, also set `las_completed:true`. ## Task 4 — Install the tags so the events land (site-wide, net-new) - Install **GTM `GTM-PQZJXQW5`** in `` on the main site **and** the `las.myanchorworks.com` subdomain. - GTM should fire **GA4 `G-YBPMV5S1W4`** + Meta Pixel PageView (Pixel: create as `AnchorWorks Web` — currently the blocker) + a Google Ads remarketing tag. - ⚠️ Reconcile with the **GHL External Tracking ID `tk_d7ae9495801444d98e20c126b33df834`** (configured in GHL, not deployed) so page-views/form-fills **don't double-count** — pick GTM *or* the GHL tracker for page views, not both. - Pixels are **forward-only** — every day without them = retargeting audience lost. --- ## Notes - **Field keys stay `snake_case`** (`las_q01_trucks`, `las_completed`, `las_last_question_reached`) — matches all existing `las_*` fields. Do not kebab-case field keys. - These new fields (`las_completed`, `las_last_question_reached`, `las_started_at`) — Chris's side will create them in GHL (via the GoHighLevel API) so your POSTs have somewhere to land. Confirm they exist before relying on them. - Doc fix: `KPI-Command-Center/03-funnels/funnel-map.md` calls this a "15-q survey" and uses "category/tier" — it's **16 questions** and the real fields are `las_archetype` / `las_grade` / `las_stage`. Please align the doc when you touch it.