Quickstart

Undercurrent Analytics is a platform that allows you to completely delegate product analytics to an AI agent. You can also delegate setup.

  1. Register and receive your onboarding credentials file.
  2. Move your onboarding credentials JSON file into your repo and add it to .gitignore.
  3. Start your Grafana with one docker run.
  4. Ask your AI harness to set up the analytics client library so that your app sends events to https://ingest.undercurrentanalytics.dev.
  5. Ask your AI harness to create dashboards to visualize user activation, retention, and specific engagement metrics.

1. Register and receive your onboarding credentials file

Register by entering your email at https://undercurrentanalytics.dev/#get-access. We’ll then send you an email with an attached JSON credentials file. The file contains the following:

  • Your non-secret project token, which is a string that identifies events sent by your app.
  • Your secret query token, which lets your Grafana read your events.

2. Move the onboarding credentials to your app repo

mv ~/Downloads/undercurrent-analytics-*.json /path/to/your/app/repo
echo 'undercurrent-analytics-*.json' >> .gitignore
git add .gitignore
git commit -m "Ignore Undercurrent Analytics credentials file" .gitignore

Note: Keep your query token secret. Anyone holding it can read your events. If it leaks, ask us to revoke it — that takes effect immediately, and you just paste the new one into your docker run.

3. Start your Grafana

You run Grafana yourself. We publish an image with the data source and a starter dashboard already set up, so there is nothing to configure:

docker run -d --name undercurrent \
  -p 3000:3000 \
  -v undercurrent-grafana:/var/lib/grafana \
  -e UNDERCURRENT_TOKEN=<your query token> \
  robmoore121/undercurrent-grafana:latest

Open localhost:3000 and sign in as admin / undercurrent. You should land on a page showing your most recent events — empty for now, until you complete step 4.

You need Docker, and you should use a named volume as shown above rather than a host directory, or Grafana won’t be able to write its database. See self-hosting for configuration, upgrades, and backups.

Change the admin password before you expose port 3000 to anything beyond your own machine. The default is published in the image, so it is public knowledge. Pass -e GF_SECURITY_ADMIN_PASSWORD=<your choice>.

4. Ask your AI harness to set up the analytics client library

Undercurrent’s ingest is wire-compatible with Mixpanel, so you set up event tracking by adding the Mixpanel client library to your project and pointing it at Undercurrent’s event ingest endpoint, https://ingest.undercurrentanalytics.dev.

You can delegate this set up to your AI harness using this prompt:

In essence, this involves the following steps:

  1. Installing the Mixpanel client library by following the official guide for your platform: Install Mixpanel → Code.
  2. Initializing the client with these two overridden values: (1) Server URL: https://ingest.undercurrentanalytics.dev (2) Project token: The project token in your onboarding credentials file.

When you’re done with this step, your app codebase should:

  • Have a dependency on the Mixpanel client library for your platform (iOS, Android, React Native, or Flutter).
  • Initialise Mixpanel using your project token and with serverURL set to https://ingest.undercurrentanalytics.dev.
  • Identify each user with a stable distinct ID.
  • Use the Mixpanel library to send analytics events for the interactions you care about.

5. Ask your AI harness to create the dashboards

With events flowing in, the next step is to turn them into dashboards that reveal the metrics that matter for your app. Typically, these are related to activation, engagement, and retention.

While it is perfectly possible for you to build Grafana dashboards and write the supporting SQL queries yourself (people have been using Grafana this way for years), this is something you can very effectively delegate to an AI coding harness such as Claude Code using a frontier model.

Because Grafana runs on your machine, your harness can reach it directly at http://localhost:3000 — there are no credentials to hand over beyond your admin password.

Viewing the dashboards

Go to localhost:3000 and sign in. From there you can browse any dashboards your harness has created, tweak panels, or build new ones directly.

Your dashboards live in the Docker volume on your machine, so it’s worth exporting the ones you care about as JSON and committing them to your app repo. That gives you dashboards-as-code, reviewed alongside the features they measure.

When you’ve completed the steps in this quickstart guide, you should have:

  • Your app sending events to Undercurrent about how users are interacting with it.
  • A Grafana running locally, with detailed dashboards that show you how your app is being used.

← Back to undercurrentanalytics.dev