Devlog: Automating Live-Ops with GA4, Gemini AI, and Zero-Trust Cloud Functions

TL;DR: Millennium Falck Enterprise has successfully automated the telemetry-to-insight pipeline for the iOS game Silly Con Valley. Using Google Analytics 4, Gemini 2.5 Flash, and Cloud Firestore, the system compiles weekly community play stats into a satirical VC newsletter delivered dynamically to players on launch—requiring zero manual maintenance.

Silly Con Valley is an iOS startup simulator game developed by Millennium Falck Enterprise. In our quest for absolute efficiency and peak corporate sarcasm, we automated our weekly live-ops dashboard update. Instead of manually writing satirical VC reports analyzing player metrics (e.g., explaining why a 62% bankruptcy rate is “bullish”), we built a fully serverless data aggregation and generation pipeline.

How does the automated Live-Ops pipeline work?

The system runs on a serverless loop that fetches telemetry, aggregates it, runs it through generative AI, and publishes it back to the client-side game interface. The architecture operates in four automated stages:

  • 1. Sunday Trigger: A Cloud Scheduler cron job invokes our Firebase Cloud Function weekly at midnight.
  • 2. Telemetry Retrieval: The function queries Google Analytics 4 (GA4) using @google-analytics/data to retrieve player metrics (CEO archetypes, average valuation, and bankruptcy ratios).
  • 3. Satirical Synthesis: The raw metrics are structured and passed to the Gemini 2.5 Flash API with a instructions to output a strict JSON payload containing a VC-style newsletter.
  • 4. Firestore Publish: The function writes the structured JSON report directly to Cloud Firestore under live_insights/report_[year]_w[week].

How is player telemetry safely collected and queryable?

We leverage Google Analytics 4 to track anonymized user sessions. Our Firebase Cloud Function aggregates specific gameplay events from the last 7 days:

  • game_started logs the chosen ceo_archetype (e.g., “The Hacker”, “The Trust Fund Kid”).
  • ipo_secured tracks the final company ipo_valuation.
  • game_over records the game outcome (e.g., “bankruptcy” vs “IPO”) to compute the community failure rate.

How does Gemini AI write the VC newsletters?

To prevent format leakage or client-side parsing failures, the Cloud Function uses the Node.js @google/genai SDK with a strict JSON schema enforced. Gemini 2.5 Flash receives the raw stats and returns a structured format:

{
  "title": "A satirical title mimicking VC thought-leadership publications",
  "summary": "A 2-sentence summary of the week's market status",
  "outlook": "A humorous, elitist VC analysis of player bankruptcy rates"
}

Why is the pipeline zero-trust?

By running the pipeline entirely within the Google Cloud ecosystem, we eliminated the need for hardcoded service account keys or .json credentials. The authentication is managed via Application Default Credentials (ADC). The Firebase Admin SDK automatically authenticates using the runtime environment’s IAM service account, which has read-only access to our GA4 property and write access to Firestore. External API keys (like the Gemini key) are stored and decrypted securely using Google Cloud Secret Manager.

How does the iOS client retrieve the live newsletter?

On app launch, the game’s Swift client fetches the latest insight document from Firestore using the LiveContentManager class:

func fetchMarketInsights() async throws -> [LiveMarketInsight] {
    let snapshot = try await Firestore.firestore().collection("live_insights").getDocuments()
    return snapshot.documents.compactMap { doc in
        try? doc.data(as: LiveMarketInsight.self)
    }
}

If the user is offline, the client gracefully falls back to a cached local plist. Online users receive an immediate, dynamically generated dashboard representing last week’s aggregate community play stats, operating at a maintenance cost of exactly $0.00.

Silly Con Valley: Week 22 Analytics Snapshot

The Startup Grind is More Brutal Than Ever
Our data confirms that the “Valley Grind” is intensifying. While the user count remains small, the remaining founders are logging significant time.

  • Engagement Up: We observed a marked increase in sessions, with 11 founders now logging an impressive 4.12 sessions per user on average.
  • The Survival Cohort Grows: Our most dedicated group has doubled. There are now 8 hardcore founders who are demonstrating incredible resilience, surviving an average of 31 weeks before either burning out or successfully reaching their IPO.

2. VC Pitching remains a Bloodbath
If you thought fundraising was getting easier, think again. The VCs are more critical than ever.

  • Higher Volume, Same Rejection: Pitching activity skyrocketed.
    • Pitches Started: 145 (Up from 110)
    • Pitches Won: 68
    • Pitches Lost: 89 (The rejection count increased by nearly 30%!)
  • Win Rate Holds Steady: Despite the increased volume, the success rate only ticked up slightly to ~47%. Founders are still losing more pitches than they are winning. We are maintaining our theory that the start/finish discrepancy points to rage-quits during aggressive monetization grilling.

3. Founders continue to ‘Read the Docs’ for Exploits
Our Engaged Players are highly observant and always looking for a tactical advantage.

  • Engagement is High: The changelog_opened event was triggered 48 times, confirming that roughly half our player base is obsessed with finding every patch note and potential pivot. They aren’t just playing; they are looking for loopholes in the system—the modern digital unpaid internship.

4. Desktop Dominance Continues (for serious management)
The platform-specific data shows our CEOs understand the ‘grind’ requires a proper workstation.

  • Usage Spikes: The desktop_app_opened event was fired 65 times. Our users are overwhelmingly choosing their in-game desktop computers for complex empire management over simple swiping. True empire management doesn’t happen on a smartphone.