02 / BEHAVIOURAL INFRASTRUCTURE

Adaptive Conversion Engine

A behavioural state system that changes how a website responds to visitor intent, engagement, and hesitation, instead of showing every visitor the same conversion path.

STATE MACHINE SESSION CONTINUITY TELEMETRY PYTHON FASTAPI
01 // THE CORE PROBLEM

Most websites ask for the exact same thing from everyone.

Whether a visitor just discovered the site, is researching alternatives, or is ready to make a decision, traditional websites treat them identically: a static contact form demanding high-commitment data upfront.

STATIC CONVERSION MODEL Rigid Flow

The Blind Form

Demands Name, Email, Phone, and Project Brief immediately. When visitors hesitate or close the form, the website has no alternative path. Rejections are treated as binary bounces with zero recovery.

01. Visitor lands on site
↓
02. Static 4-field form presented
↓
03. Visitor hesitates & dismisses → Lost forever
ADAPTIVE CONVERSION MODEL State-Aware

The Responsive State Layer

Observes engagement signals, establishes early intent with zero input friction, and dynamically modulates the interface. If friction occurs, it de-escalates to a minimal callback alternative instead of repeating the ask.

01. Intent categorized with zero friction
↓
02. Micro-permission gate confirmed
↓
03. Adapts to high-spec form or 1-field callback fallback
02 // SYSTEM CONCEPT

Behaviour becomes a signal.

The engine turns passive visitor telemetry into a structured state machine. Every click, dismissal, navigation, and pause informs what the interface should do next.

STAGE 01

OBSERVE

Continuously listens to micro-interactions across the session without running heavy background compute or tracking cross-site cookies.

  • Clicks, dismissals & overlay touches
  • Cross-page navigation events
  • Form engagement keystrokes
  • 40-second inactivity deadlines
STAGE 02

STATE

Maintains an explicit client-side finite state machine in sessionStorage. It maps where the user is in the decision funnel and remembers scheduled triggers across page changes.

  • Active window & funnel step index
  • Window status: active / dismissed / timed_out
  • Absolute epoch fallback timers
  • Cumulative dismissal counter
STAGE 03

RESPONSE

Adapts the interface in real time based on observed resistance, promoting rich intake, deferring to a single-field callback, or pausing cleanly to prevent fatigue.

  • Progresses on affirmative micro-actions
  • De-escalates on rejection or dismissal
  • Pauses when live chat is open
  • Terminates on double dismissal
03 // BEHAVIOURAL STATE FUNNEL

The four behavioural windows.

The engine operates through a coherent vertical progression of four distinct behavioural windows, each designed for a specific psychological threshold.

01
WINDOW 01 // INTENT DETECTION 10s Active Browse Trigger
Zero Friction

Categorize Problem Domain

Low-stakes qualification. Instead of asking who the visitor is, it asks what they are trying to solve. Selecting an option immediately captures high-level intent without asking for a single piece of contact data.

MODAL PROMPT
“What system are you trying to build?” [Website ▾]
02
WINDOW 02 // SOFT PROMPT Micro-Commitment Gate
Permission First

Establish Explicit Micro-Consent

Asks for permission before presenting input fields. If the visitor clicks "Yes, show me", they have made an active affirmative micro-commitment. If they decline, the system respects the choice and steps back.

MODAL PROMPT
“Want us to map it for you?”
Yes, show me Not now
03
WINDOW 03 // FULL SCOPE INTAKE High-Intent Channel
Rich Payload

Structured Requirement Collection

Only shown to visitors who gave affirmative consent in Window 02. Collects the requirement brief, WhatsApp contact, and optional email. Typing into any field immediately flags the session as form_engaged.

INTAKE FORM FIELDS
[Textarea] Describe your requirement... [Input] WhatsApp number (required) [Input] Email (optional)
04
WINDOW 04 // CALLBACK FALLBACK De-escalation Rescue
Minimal 1-Field

Friction-Adaptive Fallback

Triggered after a 25-second delay if the user declined Window 02, dismissed Window 02, or closed Window 03 without submitting. It drops form complexity down to a single phone input: "Prefer a quick call instead?"

DE-ESCALATED PROMPT
“Prefer a quick call instead?” Get a call back
04 // ADAPTIVE LOGIC

The system doesn't just move forward. It can step back.

Static funnels are one-way streets: if a user says no, the interaction dies. The Adaptive Conversion Engine implements bi-directional routing based on observed hesitation.

ASCENDING COMMITMENT (HIGH INTENT PATH)

Progressing on Affirmative Signals

When the visitor engages positively (selects intent, clicks "Yes, show me"), the system safely escalates from zero-effort questions to structured scope capture.

01. Window 01: Intent Categorized
02. Window 02: Permission Granted
03. Window 03: Comprehensive Scope Form Submitted
FRICTION DE-ESCALATION (HESITATION PATH)

De-escalating on Resistance Signals

When the visitor closes or declines a modal, the system does not repeat the request. It steps back, initiates a delayed fallback timer (25s), and returns with a single-input callback option.

01. Window 02 or 03 Dismissed / Declined
02. Engine transitions to Idle (25s Delay)
03. Window 04: Minimal 1-Field Phone Fallback Deployed
05 // TECHNICAL ARCHITECTURE

Client state machine to durable backend.

A resilient pipeline combining frontend session storage, beaconing webhooks, and a FastAPI backend with Airtable persistence and Resend alerting.

CLIENT BROWSER state-engine.js FSM + sessionStorage
→
NETLIFY REWRITE /api/track Proxy Keepalive fetch beacon
→
PYTHON FASTAPI the-microsite-api Pydantic validation & logic
→
PERSIST & NOTIFY Airtable + Resend Deduplicated lead alert
Session Continuity Pending fallback actions use absolute epoch timestamps (pendingActionAt), surviving page reloads and cross-page clicks without resetting.
Granular Telemetry Serializes a full chronological audit trail of interaction events (actions array) capturing every view, click, dismissal, and engagement time.
Deduplicated Ingestion FastAPI checks the Lead Alert Sent field in Airtable by Session ID formula before triggering alerts, preventing duplicate emails on retries.
Failure Isolation Lead data is committed to Airtable before email dispatch. An upstream Resend failure logs an error but still returns HTTP 200 to the browser.
06 // ADAPTIVE PRINCIPLES

What makes it truly adaptive.

The system does not adapt by hallucinating dynamic text, it adapts by modifying the structural friction and timing of the conversion funnel in response to visitor state.

PILLAR 01

Friction De-escalation

When a visitor hesitates on a 3-field requirement form, repeating that form will only guarantee a bounce. The engine de-escalates to a minimal 1-field phone callback after an intentional delay.

PILLAR 02

Intent-Informed Progression

Low-stakes problem categorization (0 inputs) → Explicit permission gate (1 click) → Comprehensive brief (form) → Fallback rescue (1 input). Cognitive resistance is reduced at each step.

PILLAR 03

Cross-Page Session Memory

Timers are not bound to a single DOM lifecycle. Navigating between Home, About, Work, and Blog pages preserves the exact remaining time until the next scheduled state trigger.

PILLAR 04

Fatigue Guardrails & Mutual Exclusion

Automatically suspends state triggers when the visitor opens the live system chat widget, and permanently shuts down the engine for the session after two dismissals or 40s of inactivity.

“The interface changes because the situation changes.”

07 // IMPLEMENTATION SCOPE

Current implementation & system boundaries.

An accurate technical breakdown of what is genuinely live and running in the current codebase versus architectural boundaries.

CURRENTLY IMPLEMENTED & OPERATIONAL
  • ✓ 5-state client finite state machine in state-engine.js with sessionStorage backup.
  • ✓ 4 distinct behavioural modal windows with friction-based fallback branching.
  • ✓ Absolute epoch timestamp timer calculation surviving cross-page navigations.
  • ✓ Mutual exclusion pausing when system-chat is active.
  • ✓ Beacon webhook dispatch via fetch('/api/track', { keepalive: true }).
  • ✓ Python FastAPI backend with Airtable session upserting and Resend email alerts.
BOUNDARIES & SCOPE SPECIFICATIONS
  • - Not an AI Text Generator: Intent categorization uses structured discrete categories, not real-time LLM text generation.
  • - Airtable Store: Persistence runs on Airtable API via FastAPI (not direct PostgreSQL / Supabase connection).
  • - Session Scoped: State continuity is isolated to active browser sessions (sessionStorage), not persistent cross-device cookies.
  • - Strict Accuracy: No inflated conversion multiplier claims or unbuilt automated workflows.

A website doesn't have to show every visitor the same path.

Sometimes the right response is more information. Sometimes it's less friction. Sometimes it's simply knowing when to stop asking.