Skip to main content

Quick Setup

Get up and running with MentiQ Analytics in under 5 minutes.

Installation

Basic Configuration

Wrap your app with the MentiqAnalyticsProvider and configure your API credentials.

Core Tracking Methods

Track Custom Events

Track any user action or event with custom properties.

Track Page Views

Automatically or manually track page navigation.

Identify Users

Associate events with specific users and their traits.

Component-Based Tracking

Use declarative components for automatic tracking.

TrackClick Component

Automatically track clicks on any element.

TrackView Component

Track when elements become visible on screen.

Complete Dashboard Example

A full example showing multiple tracking methods together.

Configuration Options

string
required
Your MentiQ Analytics API key from the dashboard
string
required
Your project ID from the dashboard
string
Custom analytics endpoint (defaults to MentiQ cloud)
boolean
default:"false"
Enable debug logging for development
boolean
default:"true"
Automatically track page views on route changes
boolean
default:"false"
Track clicks, hovers, and scrolls for heatmap visualization
number
default:"20"
Number of events to batch before sending
number
default:"10000"
Interval in milliseconds to flush events (10 seconds)

Environment Variables

For Next.js projects, create a .env.local file:

Next Steps

E-commerce Tracking

Track products, carts, and purchases

SaaS Metrics

Monitor subscriptions and user engagement

Content Engagement

Track reading time and scroll depth

API Reference

Explore all available methods