Customer Analytics and Event Tracking#
The nnmbl codebase tracks waitlist signup conversions across three client-side analytics platforms: Heap Analytics (user identification), Google Ads (conversion tracking), and Meta Pixel (advertising). All initialization is in src/app.html and all conversion events fire from src/lib/JoinWaitlist.svelte.
⚠️ Implementation gap: The Slack threads reference plans for PostHog, Cal.com webhooks, HubSpot, Customer.io, and Apollo integrations (thread 1, thread 2, thread 3). None of these are implemented in the codebase. The current implementation covers only the waitlist signup funnel.
Platform Summary#
| Platform | Purpose | Config Location | Event Location |
|---|---|---|---|
| Heap Analytics | User identification & behavioral analytics | app.html:24–74 | JoinWaitlist.svelte:45,74 |
| Google Analytics (GA4) | Traffic analytics | app.html:22,68 | — |
| Google Ads | Conversion tracking | app.html:20,69 | JoinWaitlist.svelte:77–79 |
| Meta Pixel | Facebook advertising & registration events | app.html:76–107 | JoinWaitlist.svelte:81 |
Initialization (src/app.html)#
All scripts load in the HTML <head> . Analytics are environment-gated: Google Analytics, Google Ads, and Meta Pixel only initialize when window.location.hostname !== 'localhost' . Heap uses separate app IDs per environment .
IDs at a glance:
- Heap production:
774343349/ development:879312826 - Google Analytics:
G-VQ4HFHCFQE - Google Ads:
AW-973253532 - Meta Pixel:
4893106970766162
Conversion Events (src/lib/JoinWaitlist.svelte)#
The handleSubmit function fires all conversion events on a successful signup POST to /signup:
- Heap identify — called with the user's email on mount (if already authenticated) and again on successful registration .
- Google Ads conversion — fires
gtag('event', 'conversion', { send_to: 'AW-973253532/JgjaCN2tsZADEJzXitAD' }). - Meta Pixel — fires
fbq('track', 'CompleteRegistration').
Meta Pixel also fires a PageView event automatically on every page load via the initialization block in app.html .
Planned Integrations (Not Yet Implemented)#
The following were discussed in engineering Slack threads and represent the intended future state:
- PostHog — application-level event tracking and funnels (Add Cal.com webhooks to emit PostHog events)
- Cal.com webhooks — emit booking events (demos, onboarding, meetings) into PostHog (Cal.com configuration for demo links)
- Google Analytics conversion hooks — additional app state change tracking (Add event tracking/conversion hooks)
- HubSpot, Customer.io, Apollo — CRM and sales pipeline visibility (referenced in topic description; no implementation found)