E2E Analytics Architecture for an AI-powered B2B discovery platform
Real-time product visibility, privacy-first design, and future-proofing for scale —> built with one developer and systemic thinking.
The Challenge
An AI-powered B2B stylist discovery tool was in development for our wholesale bridal retailers. Analytics hadn't entered the conversation.
Without measurement infrastructure, there would be no way to know whether the tool was working, no real-time visibility into stylist behavior, and no path to connect product/sales insights back to business outcomes.
Recognizing this gap required thinking systemically about the entire data pipeline - from UI behavior to business impact.
What existed
A product roadmap and development timeline. Nothing on measurement.
What was needed
A measurement system that provides real-time feedback and connects to business systems—designed and owned end-to-end with one developer.
The Measurement Architecture: Six Layers
From UI element to business insight, the measurement system required thinking across six connected layers:
UI elements & user actions
What stylists actually click, select, filter, and save in the tool.
Data layer definition
What information is relevant to capture? Which data serves the KPI and provides context for reporting?
GA4 custom dimensions & metrics
Map data layer contents to GA4's constraint model (50 custom dimensions max). Name conventions so inheritance is clear.
GTM event building
Define which data points must travel with each event to make reporting reliable. Validate data structure before it lands.
Reporting & dashboards
Build real-time dashboards aligned to base-level KPIs. What does success look like, and how do we see it?
Business system connection
Feed insights back into sales/ordering systems and EDW. Connect product behavior to actual business outcomes.
The constraint: GA4 allows 50 custom dimensions. With a PWA this large and scope still shifting, it was easy to exceed that ceiling. The architecture had to anticipate future features (AI search enhancements, fitting room management) and leave room for evolution without hitting the limit.
Why GA4 → GTM → BigQuery (not alternatives)
The real choice wasn't technical elegance. It was real-time visibility.
Alternative: dump product events straight to the existing data lake. But data warehouse pipelines run on batch schedules data arrives days later or needs to be queried for each KPI outcome.
For a tool live with end users right now, the business needs to know in real-time whether filters are working, whether search is effective, whether stylists are abled to finding gowns.
GA4 provides real-time feedback.
GTM adds a validation layer so data is consistent and reliable without a dedicated engineer maintaining queries.
BigQuery becomes the sink for deeper historical analysis and eventual connection to business outcomes.
The decision: GA4 + GTM + BigQuery solved the real problem - real-time product feedback *plus* eventual business connection - given the constraints: an organization that already uses GA4 as standard, and no dedicated data engineering bandwidth.
Privacy-first and AI-ready
Privacy from day one
EU-based stylists and appointment context required GDPR to inform the data layer upfront, not retrofit:
No PII in events; hashed session IDs tied to server-side customer accounts
Sensitive properties logged separately with explicit consent
Data retention policies baked into schema
Built for Phase 2
Phase 1 scope is linear:
login → filter → gallery → PDP → product selection
Phase 2 introduces AI search enhancements and fitting room management. The schema was designed to absorb these features without requiring a complete rebuild - event naming, custom dimensions, and data structures anticipate complexity that doesn't exist yet.
Real-Time Measurement in Practice
When a stylist uses a silhouette filter, do they explore more gowns or narrow too much? Does this filter support discovery?
Stylists applying silhouette + size + price filters have clearer intent. Does refinement depth predict engagement and selection?
Stylists prep one week, return for appointment days later. Cross-session behavior reveals intent arcs without exposing identity.