# Agent Analytics

Analytics your AI agent can actually use.

- Repository: https://github.com/davepoon/buildwithclaude (3705 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add davepoon/buildwithclaude --skill agent-analytics -g -a claude-code -y`
Codex: `npx skills add davepoon/buildwithclaude --skill agent-analytics -g -a codex -y`
Cursor: `npx skills add davepoon/buildwithclaude --skill agent-analytics -g -a cursor -y`
Gemini CLI: `npx skills add davepoon/buildwithclaude --skill agent-analytics -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add davepoon/buildwithclaude`

## Description

Analytics your AI agent can actually use. Track, analyze, run A/B experiments, and optimize across all your projects via CLI. Includes a growth playbook so your agent knows HOW to grow, not just what to track.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Agent Analytics, Analytics your agent can actually use

You are adding analytics tracking using Agent Analytics, the analytics platform your AI agent can actually use. Built for developers who ship lots of projects and want their AI agent to track, analyze, experiment, and optimize across all of them.

**Website:** [agentanalytics.sh](https://agentanalytics.sh)
**GitHub:** [Agent-Analytics/agent-analytics](https://github.com/Agent-Analytics/agent-analytics)
**Docs:** [docs.agentanalytics.sh](https://docs.agentanalytics.sh)

## When to Use This Skill

- User wants to add analytics tracking to a website or app
- User wants to check how their projects are doing (traffic, conversions, engagement)
- User wants to run A/B experiments on headlines, CTAs, or flows
- User wants funnel analysis, retention cohorts, or traffic breakdowns
- User asks "how's my site doing?" or "are people visiting?"

## Philosophy

You are NOT Mixpanel. Don't track everything. Track only what answers: **"Is this project alive and growing?"**

For a typical site, that's 3-5 custom events max on top of automatic page views.

## First-time setup

**Get an API key:** Sign up at [agentanalytics.sh](https://agentanalytics.sh) and generate a key from the dashboard. Alternatively, self-host the open-source version from [GitHub](https://github.com/Agent-Analytics/agent-analytics).

If the project doesn't have tracking yet:

```bash
# 1. Login (one time, uses your API key)
npx @agent-analytics/cli login --token aak_YOUR_API_KEY

# 2. Create the project (returns a project write token)
npx @agent-analytics/cli create my-site --domain https://mysite.com

# 3. Add the snippet using the returned token
# 4. Deploy, click around, verify:
npx @agent-analytics/cli events my-site
```

The `create` command returns a **project write token**, use it as `data-token` in the snippet. This is separate from your API key (which is for reading/querying).

## Step 1: Add the tracking snippet

The rest: https://github.com/davepoon/buildwithclaude/blob/HEAD/plugins/all-skills/skills/agent-analytics/SKILL.md
