Firebase Analytics on the client, exported to BigQuery for the funnel and cohort views the admin dashboard reads from. The taxonomy below is the actual event set — not a promise to "add analytics hooks later."
Live in admin/dashboard.html — this is where "track conversion through the marketplace" is actually answered.
| Event | Fired when | Key params |
|---|---|---|
| app_open | Cold or warm launch | city_id, is_first_open |
| city_selected | User picks a city on onboarding | city_id |
| tour_view | Tour detail screen opens | tour_id, category, source |
| tour_started | "Start tour" tapped | tour_id |
| stop_arrived | Geofence entry detected | stop_id, tour_id, dwell_prior_stop_s |
| audio_played | Narration playback starts | stop_id, completion_pct (on end) |
| ar_scan_started | Camera opens on a stop | stop_id, recognition_method |
| ar_target_locked | Recognition succeeds | stop_id, method, latency_ms |
| ar_fallback_used | Manual code or no-AR path taken | stop_id, fallback_step (2/3/4) |
| tour_completed | Final stop's geofence exited | tour_id, duration_s, stops_completed |
| artist_profile_view | Artist profile opened | artist_id, source (stop/market/passport) |
| artwork_view | Artwork detail opened | artwork_id, artist_id, source_stop_id |
| add_to_cart | Add to cart tapped | artwork_id, price, currency |
| checkout_started | Checkout screen opens | cart_value, item_count |
| purchase | Payment confirmed | order_id, value, currency, payment_method, source_tour_id |
| review_submitted | Verified-purchase review published | order_id, artwork_id, rating |
| offline_pack_downloaded | Tour pack cached | tour_id, size_mb |
Note the purchase event's source_tour_id param — this is the field that answers "did the tour drive the sale," the attribution chain described on the landing page.
Standard Firebase cohort retention (D1/D7/D30) plus a Madrid-specific cut: installs and sessions by tour, so the studio can see which route — Lavapiés Walls vs. Doctor Fourquet — is actually driving engagement and marketplace revenue, live on the admin dashboard.