agent-analytics
Web analytics platform that AI agents can query via CLI. Track page views, custom events, run A/B experiments, analyze funnels, retention cohorts, and traffic heatmaps. Use when the user needs web analytics, visitor tracking, event tracking, conversion optimization, growth insights, A/B testing, or wants to add analytics to their website or app. Also available as an MCP server at mcp.agentanalytics.sh.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/dannyshmueli/agent-analyticsAgent Analytics — Stop juggling dashboards. Let your agent do it.
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.
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 and generate a key from the dashboard. Alternatively, self-host the open-source version from GitHub.
If the project doesn't have tracking yet:
# 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 (Step 1 below) 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 below. This is separate from your API key (which is for reading/querying).
Step 1: Add the tracking snippet
The create command returns a tracking snippet with your project token — add it before </body>. It auto-tracks page_view events with path, referrer, browser, OS, device, screen size, and UTM params. You do NOT need to add custom page_view events.
Step 1b: Discover existing events (existing projects)
If tracking is already set up, check what events and property keys are already in use so you match the naming:
npx @agent-analytics/cli properties-received PROJECT_NAME
This shows which property keys each event type uses (e.g. cta_click → id, signup → method). Match existing naming before adding new events.
Step 2: Add custom events to important actions
Use onclick handlers on the elements that matter:
<a href="..." onclick="window.aa?.track('EVENT_NAME', {id: 'ELEMENT_ID'})">
The ?. operator ensures no error if the tracker hasn't loaded yet.
Standard events for 80% of SaaS sites
Pick the ones that apply. Most sites need 2-4:
| Event | When to fire | Properties |
|---|---|---|
cta_click | User clicks a call-to-action button | id (which button) |
signup | User creates an account | method (github/google/email) |
login | User returns and logs in | method |
feature_used | User engages with a core feature | feature (which one) |
checkout | User starts a payment flow | plan (free/pro/etc) |
error | Something went wrong visibly | message, page |
What to track as cta_click
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-dannyshmueli-agent-analytics": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
supermetrics
Official Supermetrics skill. Query marketing data from 100+ platforms including Google Analytics, Meta Ads, Google Ads, and LinkedIn. Requires API key.
social-insights
Social media analytics and performance tracking. Track engagement, optimal posting times, competitor analysis, and generate actionable reports.
chaterimo
AI Customer Service for Shopify & E-commerce - Query conversations, analyze chatbot performance, and manage your Chaterimo AI assistant
social-sentiment
Sentiment analysis for brands and products across Twitter, Reddit, and Instagram. Monitor public opinion, track brand reputation, detect PR crises, surface complaints and praise at scale — analyze 70K+ posts with bulk CSV export and Python/pandas. Social listening and brand monitoring powered by 1.5B+ indexed posts.
Web Scraper (r.jina.ai)
Bypass Cloudflare and scrape any website using r.jina.ai API. Works on sites with strong protection like Truth Social, Cloudflare Turnstile, etc.