Skip to main content

User Journey Tool

Purpose: AI-powered web application that analyses Google Analytics 4 (GA4) user journey data using Google's Gemini AI. Built as Pacing Agency's base platform for client journey tools; each client gets isolated data access via multi-tenant configuration.

Where it runs: Google Cloud Run (europe-west1). The original Therapy Lounge deployment uses project the-therapy-lounge-302122. Client-specific forks (for example FFI Journey Analyser and AQL Journey) run as separate Cloud Run services with their own domains.

Last verified: July 2026


Quick Reference​

FeatureCapability
AI analysisGemini 2.5 Flash summaries of GA4 event journeys
BigQueryDirect queries against GA4 export tables
Multi-tenantPer-client GCP project, dataset, and access control
AuthenticationSupabase Auth (Google OAuth and email/password)
AdminUser and client configuration panels with role-based access
Follow-up Q&AInteractive session-by-session breakdowns
MonitoringGitHub Actions for Supabase keep-alive and Cloud Run health checks

Overview​

The User Journey Analyser is Pacing Agency's foundational journey analytics platform. Operators enter a GA4 user ID and receive an AI-generated summary of behaviour, acquisition sources, and conversion paths. Admin users manage which clients and users can access which BigQuery datasets.

Key capabilities:

  • User journey analysis — summarise a single GA4 user ID with AI narrative
  • Follow-up questions — deeper session-by-session analysis in a persistent chat session
  • BigQuery integration — reads GA4 export data directly from the client's GCP project
  • Multi-tenant architecture — isolated client configurations with automatic GCP permission setup
  • Admin panels — manage users, client configs, and role assignments

Specialised client deployments built on or forked from this base include FFI Journey Analyser (lead-gen: GA4 + HubSpot + Salesforce) and AQL Journey (ecommerce: GA4 + Shopify on the shared CORE engine).


Account Access​


Technology Stack​

LayerTechnology
BackendPython Flask
AIGoogle Vertex AI (Gemini 2.5 Flash)
GA4 dataGoogle BigQuery (per-client GA4 export dataset)
AuthSupabase Auth (Google OAuth, email/password)
DeploymentGoogle Cloud Run (europe-west1)
ContainerisationDocker
FrontendHTML5, CSS3, JavaScript (responsive, dark/light mode)

Repository​

  • Source: Pacing-Agency/user-journey-analyzer
  • Deploy script: ./deploy.sh (commits, pushes, and deploys to Cloud Run)
  • Docs in repo: docs/CLIENT_SETUP_GUIDE.md, docs/LOCAL_DEVELOPMENT.md, docs/MONITORING_AND_KEEP_ALIVE.md

Local Development​

git clone https://github.com/Pacing-Agency/user-journey-analyzer.git
cd user-journey-analyzer

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

gcloud auth application-default login

python3 run_local.py

The application runs at http://localhost:8080. See docs/LOCAL_DEVELOPMENT.md in the repository for full setup (Supabase tables, OAuth, and BigQuery permissions).


Deployment​

Production deploys use ./deploy.sh which pushes to main and runs gcloud run deploy user-journey-analyzer in europe-west1. Required environment variables include SUPABASE_URL, SUPABASE_ANON_KEY, CLIENT_GCP_PROJECT, CLIENT_BQ_DATASET, TOOL_HOST_PROJECT, and LOCATION.

GitHub Actions workflows in the repository:

  • keep-alive.yml — Supabase keep-alive every 3 hours
  • cloud-run-health-check.yml — Cloud Run monitoring every 15 minutes with email alerts on failure

CI / CD​

WorkflowTriggerPurpose
keep-alive.ymlEvery 3 hoursPrevents Supabase project pause via REST API ping
cloud-run-health-check.ymlEvery 15 minutesMonitors Cloud Run service health

  • FFI Journey Analyser — live FE Fund Info deployment (GA4 + HubSpot + Salesforce)
  • AQL Journey — live Aqualona ecommerce deployment (GA4 + Shopify on CORE engine)
  • Google Analytics — GA4 properties and BigQuery export
  • Google Cloud — GCP projects and Cloud Run hosting
  • n8n — workflow automation (can integrate with journey APIs where exposed)

Last Updated: July 2026
Owner: Ben Power
Status: Active (base platform; client instances deployed separately)