Skip to main content

Add a Product

Get started with Oppla analytics in just a few simple steps. Track user behavior, feature usage, and experiments with a single lightweight script.

Quick Start

Step 1: Get Your Product Credentials

  1. Log into your Oppla Dashboard
  2. Navigate to My ProductsAdd Product
  3. Click Add Product
  4. Copy your Product ID and Account ID

Step 2: Add the Tracking Script

Add this script to your product’s <head> section:
That’s it! Oppla will automatically start tracking:
  • Page views
  • User sessions
  • Click events (with data-oppla-event attributes)
  • Feature flag usage
  • Experiment participation

Advanced Features

Track Custom Events

Track button clicks, form submissions, or any custom event:

Identify Users

Track logged-in users across sessions:

Feature Flags

Control feature visibility based on user segments:

A/B Testing

Run experiments to optimize your user experience:

Configuration

Configuration Options

Customize tracking behavior with optional attributes:

JavaScript API

Once installed, these methods are available globally:

Verification

Testing the Installation

  1. Check the Console
    • Open browser Developer Tools (F12)
    • Type window.oppla in the Console
    • You should see the Oppla object with available methods
  2. Check Network Activity
    • Go to Network tab in Developer Tools
    • Look for requests to tracker.oppla.ai
    • Verify requests to /api/send are successful (200 status)
  3. Check Your Dashboard
    • Visit your Oppla Dashboard
    • Navigate to AnalyticsReal-time
    • You should see your current session

Common Issues

  • window.oppla is undefined: Ensure the script is in the <head> section and has loaded
  • No data in dashboard: Verify your Product ID and Account ID are correct
  • Blocked by ad blocker: Ask users to whitelist tracker.oppla.ai
  • Not tracking localhost: Localhost tracking is disabled by default for development

Next Steps

Track Events

Learn how to track custom events

Feature Flags

Control feature rollouts and A/B tests

User Segments

Create user segments for targeted features

API Reference

Complete JavaScript SDK documentation