Welcome to Grain Analytics
Grain Analytics helps you understand user behavior and control your app’s features remotely—all without sacrificing performance or simplicity. Whether you’re a developer building a React app or a marketer setting up tracking via Google Tag Manager, we’ve got you covered.New to Grain? Head to grainql.com to create your account and grab your tenant ID from the dashboard.
What Can You Do with Grain?
Track User Behavior
Understand how people actually use your app. See where they click, what paths they take, and which features drive engagement.Control Features Remotely
Turn features on or off, run A/B tests, and personalize content—all without deploying code.Own Your Data
No vendor lock-in. Export your data anytime, query it however you want, and keep full control.Choose Your Path
Pick what fits your situation best:I'm a Developer
Working with JavaScript, React, or Next.js
I Don't Code
Using tools like GTM, Shopify, or WordPress
For Developers
Jump into the platform you’re using:React
Hooks-based integration for React apps
Next.js
App Router and Pages Router examples
Vanilla JavaScript
Works with any framework (Vue, Svelte, etc.)
CDN / Script Tag
No build step required—just add a script tag
Node.js / Backend
Track server-side events and API calls
TypeScript
Full type safety and autocomplete
What You’ll Get
- Tiny footprint — 6 KB gzipped, zero dependencies
- Built for React — Hooks that feel natural
- TypeScript first — Full type safety out of the box
- Smart batching — Automatic event queuing and retries
- Works everywhere — Browser, Node.js, React Native
No-Code Integrations
Set up tracking without touching your codebase:Google Tag Manager
Add via GTM in under 10 minutes
Shopify
Track your entire customer journey
WordPress
Install with a simple plugin or theme edit
Quick Example
Here’s what using Grain looks like in code:What’s Next?
Learn Core Concepts
Understand how tracking and remote configuration work:Event Tracking
How events are batched, sent, and retried
Remote Configuration
Cache-first config with instant loading
User Identification
Track users across sessions and devices
Authentication
Secure your analytics with Auth0 or custom JWT
Explore Guides
See real-world examples and best practices:E-commerce Tracking
Track purchases, carts, and product views
A/B Testing
Test features and measure impact
Feature Flags
Roll out features gradually and safely
Tracks & Funnels
Analyze complete user journeys
Browse the API
Core API
All SDK methods and options
React Hooks
Complete hooks reference
Query API
Query your analytics data programmatically
TypeScript Types
Type definitions and interfaces