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:

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:

Grain Tag (Script)

The primary way to install — no build step required

React

Hooks-based integration for React apps

Next.js

App Router and Pages Router examples

Vanilla JavaScript

Works with any framework (Vue, Svelte, etc.)

Node.js / Backend

Track server-side events and API calls

TypeScript

Full type safety and autocomplete

What You’ll Get

  • 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, server-side
Not sure where to start? Try the Grain Tag (Script) for any site, or React Quick Start if you’re using React.

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
These guides are written for non-technical users. No coding experience required.

Quick Example

Here’s what using Grain looks like with the Grain Tag:
<script src="https://tag.grainql.com/v4/your-tenant-id.js"></script>
<script>
  const grain = GrainTag.getInstance();

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

  // Get remote config
  const featureEnabled = grain.getConfig('new_feature_enabled');
</script>
Or use React hooks:
import { useTrack, useConfig } from '@grainql/tag/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:

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 the Dashboard

See what Grain can show you:

Trackers

Track clicks on specific elements without code

Tracks & Funnels

Analyze complete user journeys

Heatmaps

Visualize clicks and scroll depth

Mission Control

Set goals and track progress

Browse Guides & API

E-commerce Tracking

Track purchases, carts, and product views

A/B Testing

Test features and measure impact

Core API

All SDK methods and options

Query API

Query your analytics data programmatically

Need Help?

Troubleshooting

Common issues and solutions

Dashboard

View your analytics and manage configs

Live Chat

Chat with our team (bottom right corner)