Skip to main content

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:

For Developers

Jump into the platform you’re using:

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
Not sure where to start? Try the React Quick Start if you’re using React, or Vanilla JS Quick Start for anything else.

No-Code Integrations

Set up tracking without touching your codebase: These guides are written for non-technical users. No coding experience required.

Quick Example

Here’s what using Grain looks like in code:
import { createGrainAnalytics } from '@grainql/analytics-web';

// Initialize
const grain = createGrainAnalytics({
  tenantId: 'your-tenant-id'
});

// Track events
grain.track('button_clicked', {
  button_name: 'signup'
});

// Get remote config
const featureEnabled = grain.getConfig('new_feature_enabled');
Or use React hooks:
import { useTrack, useConfig } from '@grainql/analytics-web/react';

function MyComponent() {
  const track = useTrack();
  const { value: heroText } = useConfig('hero_text');
  
  return (
    <div>
      <h1>{heroText || 'Welcome!'}</h1>
      <button onClick={() => track('cta_clicked')}>
        Get Started
      </button>
    </div>
  );
}

What’s Next?

Learn Core Concepts

Understand how tracking and remote configuration work:

Explore Guides

See real-world examples and best practices:

Browse the API


Need Help?