Hypertune
  • Introduction
  • Getting Started
    • Set up Hypertune
    • Next.js (App Router) quickstart
    • Next.js (Pages Router) quickstart
    • React quickstart
    • Remix quickstart
    • Gatsby quickstart
    • Vue quickstart
    • Nuxt quickstart
    • Node.js quickstart
    • React Native quickstart
    • JavaScript quickstart
    • Python quickstart
    • Rust quickstart
    • Go quickstart
    • Web quickstart
    • GraphQL quickstart
  • Example apps
    • Next.js and Vercel example app
  • Concepts
    • Architecture
    • Project
    • Schema
    • Flag lifecycle
    • Logic
    • Variables
    • Splits
    • A/B tests
    • Staged rollouts
    • Multivariate tests
    • Machine learning loops
    • Events
    • Funnels
    • Hypertune Edge
    • Reduction
    • SDKs
    • GraphQL API
    • Git-style version control
    • App configuration
  • Use Cases
    • Feature flags and A/B testing
    • Landing page optimization
    • In-app content management
    • Pricing plan management
    • Permissions, rules and limits
    • Optimizing magic numbers
    • Backend configuration
    • Product analytics
  • Integrations
    • Vercel Edge Config integration
    • Google Analytics integration
    • Segment integration
    • Webhooks
      • Creating webhooks
      • Handling webhooks
  • SDK Reference
    • Installation
    • Type-safe client generation
    • Initialization
    • Build-time logic snapshot
    • Hard-coded fallbacks
    • Local-only, offline mode
    • Hydrate from your own server
    • Wait for server initialization
    • Provide targeting attributes
    • Local, synchronous evaluation
    • Remote logging
    • Getting flag updates
    • Serverless environments
    • Vercel Edge Config
    • Custom logging
    • Shutting down
Powered by GitBook
On this page
  • Logging events
  • Viewing event counts
  1. Use Cases

Product analytics

PreviousBackend configurationNextVercel Edge Config integration

Last updated 10 months ago

To use Hypertune for type-safe product analytics, create event types in your to log events you want to track, e.g.

input PurchaseEvent @event  {
  context: Context!
  revenueAmount: Int!
}

The fields on the event type, e.g. context and revenueAmount are included in the event payload.

Logging events

To log events, create Void flags in your as event triggers, e.g.

type Root {
  purchase: Void!
}

Then set the logic of these flags to Log Event expressions, where you set the Unit ID of the event, typically context.user.id, and set values for the payload fields or nest more logic for them.

Events are logged when you evaluate these Void flags.

Viewing event counts

To view event counts and drop-off rates between different event types, build a .

schema
schema
funnel