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. Concepts

Events

PreviousMachine learning loopsNextFunnels

Last updated 8 months ago

To log analytics events, first create event types in your . All fields of the event will be captured in its payload, e.g.

By default, new event types include your top-level context, making it easy to capture its data. However, you can remove the context field and only include the necessary fields. For example, you can choose to log only organization-specific data without capturing user-specific data, ensuring that you don’t inadvertently log sensitive data.

Logging events

Then insert a Log Event expression in your flag logic. Select the event type you want to log from the dropdown and finally set the payload for it.

Note that when you create an event trigger, a matching event is automatically created in your schema too, streamlining the setup process.

To capture additional data not included in your top-level context, you can add fields as arguments to your event trigger via the GraphQL schema editor and then combine these new fields with existing context fields as appropriate in your event trigger logic.

type Root {
  purchase(revenueAmount: Int!): Void!
}

An event is logged when you evaluate this flag in your code.

Viewing event counts

To log events, create an event trigger in your , e.g.

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

schema
funnel
schema