Free live workshopSave my seat

How to Use Claude Code with Humblytics: A Step-by-Step Guide

A complete, copy-paste walkthrough for running your CRO from Claude Code or Codex. Install the agent, paste one prompt, and ship your first A/B test in about five minutes — no SDK wiring, no dashboard tour.

How to Use Claude Code with Humblytics: A Step-by-Step Guide

No-Code A/B Testing

Ship your first A/B test before this article ends.

Visual editor, no dev ticket, agent picks the winner. Dedication Agents lifted conversion 28% on their first test. ToForm went from 2% to 8% bookings.

How to Use Claude Code with Humblytics: A Step-by-Step Guide

Most "AI analytics" tools bolt a chat box onto a human dashboard. Humblytics is built the other way around: your agent gets the same live data you see — traffic, funnels, heatmaps, Stripe-verified revenue — plus the actions to ship a test. This guide walks through exactly how to wire Claude Code (or Codex) to the Humblytics Agent API and ship your first A/B test, start to finish.

No SDK to install. No glue code. About five minutes.

What you'll need

  • Claude Code or Codex running in your terminal (Step 0 below if you don't have it yet)
  • A site you want to optimize (any platform — one 36 KB script)
  • A Humblytics account on Business or Scale — the Agent API is included on both. No account yet? Your agent can create one for you in Step 2.

Step 0 — Install Claude Code (or Codex)

If you already run an agent in your terminal, skip ahead. If not, install one:

# Claude Code
npm i -g @anthropic-ai/claude-code

# or Codex
npm i -g @openai/codex

Open it inside the project folder for the site you want to optimize, so the agent has your codebase as context.

Step 1 — Give your agent the Humblytics instructions

Your agent needs to know how to talk to Humblytics. You have two options:

  1. Add it to your project context — paste the Humblytics prompt into your CLAUDE.md (Claude Code) or AGENTS.md (Codex). It loads automatically every session.
  2. Fetch the full spec on demand — have the agent pull the canonical instructions:
curl -o HUMBLYTICS.md https://app.humblytics.com/agent.md

The agent.md file is the complete spec: account creation, adding a website, installing the tracking script, and every analytics and A/B-testing endpoint. Grab the ready-to-paste prompt from the Humblytics agents page — the Copy install prompt button puts it on your clipboard.

Step 2 — Let your agent sign you up (no account needed first)

Here's the part that surprises people: you don't have to open the dashboard to get started. Tell your agent:

"Set up Humblytics for this site and ship a test."

If you don't have an account yet, the agent runs the onboarding flow for you:

  1. It calls POST /api/v1/auth/agent-initiate with your email and name, and gets back a verification URL.
  2. It hands you the link. You open it in your browser, choose a plan (Business $79/mo or Business annual $65/mo), and complete Stripe payment — about a minute.
  3. The agent polls GET /api/v1/auth/agent-signup-status and receives your API token the moment you finish.

Your API key never gets pasted into chat. The agent stores it as an environment variable (HUMBLYTICS_API_KEY) and references it from there — never inline, never in a file that gets committed. If you already have an account, just generate a key under Utilities → API Access and load it into your shell:

echo 'HUMBLYTICS_API_KEY=hmb_your_key_here' >> .env
echo '.env' >> .gitignore
export $(grep -v '^#' .env | xargs)

Step 3 — Your agent reads your traffic and proposes a test

This is where the agent does the work a CRO would. It pulls AI-ranked recommendations for your highest-traffic page:

GET /properties/{property_id}/split-test-recommendations?page=/pricing

It comes back with prioritized ideas — each with a CSS selector, a suggested variant, a confidence score, and an expected impact:

{
  "recommendations": [{
    "title": "Hero CTA Text",
    "selector": "button.hero-cta",
    "confidence": 84,
    "variant": "Start Free Trial",
    "impact": "High: 8%+"
  }]
}

A good rule (and the default in the install prompt): only act on recommendations with confidence ≥ 70. You review the ranked list and approve the one you want to run.

Step 4 — Ship the test

Once you approve, the agent creates the experiment:

POST /properties/{property_id}/split-tests
{
  "name": "Hero CTA — Start Free Trial",
  "page": "/pricing",
  "type": "nocode",
  "goal": "click_through",
  "auto_stop_days": 14,
  "variants": [
    { "label": "Variant A", "changes": [
      { "selector": "button.hero-cta", "op": "setText", "value": "Start Free Trial" }
    ]}
  ]
}

That's a live, no-code A/B test — split traffic, cookie-free assignment, auto-significance that stops at 95% confidence (Bayesian + frequentist). Use goal: "click_through" for CTAs and goal: "conversion" for forms.

You now have a running experiment, and you never opened the dashboard.

How do I check the result?

Ask your agent, or call the API directly:

GET /properties/{property_id}/split-tests/{test_id}

You'll see lift, confidence, and which variant is winning in real time. Because Humblytics ties conversions back to Stripe, the winner is measured in real revenue, not click proxies. When the test reaches significance, the agent can declare the winner with a PATCH — or you can let auto_stop_days close it out.

Example prompts to run on a loop

Once it's wired, you can drive the whole loop conversationally:

  • "Pull split-test recommendations for my top 5 pages and rank them by expected revenue impact."
  • "My /pricing conversion dropped this week — find out why and propose a recovery test."
  • "Every time I deploy a new landing page, get recommendations and launch a test automatically."
  • "Connect my Meta and Google Ads data and tell me which campaign drives the most Stripe revenue."

Troubleshooting

  • "$HUMBLYTICS_API_KEY is unset." The key didn't load into the agent's shell. Re-run export $(grep -v '^#' .env | xargs) in the same terminal session your agent uses.
  • 401 unauthorized. The key is missing or wrong. Generate a fresh one under Utilities → API Access.
  • 403 forbidden. API keys are scoped to a single property — the property_id in your request must match the key's property. List your properties with GET /api/v1/property/all.
  • No recommendations returned. The page needs enough traffic for the model to find a pattern. Point the agent at your highest-traffic pages first.

Why run CRO from your agent at all

Because the loop a good optimizer runs — read the data, pick the highest-impact test, ship it, measure the lift — is three API calls deep. Your agent already lives in your terminal next to your code, your deploy tooling, and your ads CLIs. Giving it the data and the actions means experiments stop waiting on a human to remember to open a dashboard.

That's also the difference that shows up in the numbers: teams that wire the agent in ship their first test in minutes instead of letting a signup sit idle for days.

Get the install prompt and start free for 14 days →

Want to see the whole pipeline built live? Join the free 60-minute workshop — ad context to revenue-attributed pages, all from Claude Code, with Amir. Save your seat →

No-Code A/B Testing

Ship your first A/B test before this article ends.

Visual editor, no dev ticket, agent picks the winner. Dedication Agents lifted conversion 28% on their first test. ToForm went from 2% to 8% bookings.

Replace 3 tools with 1

See which page changes drive revenue.

Launch your first A/B test in 60 seconds. Connect ad spend to real Stripe revenue. Let your agent tell you what to test next — all without a single developer ticket.