Add website analytics to your project with Claude Code
You can add analytics without leaving your editor. The agent does the account setup, edits your project and connects to the analytics so you can ask about traffic straight away.
1. Paste one prompt
Add measuremy.site analytics to this project: connect the measuremy.site MCP server at https://a.measuremy.site/mcp for all my projects (claude mcp add --scope user; it signs in with OAuth, no key, and one sign-in covers every site), then tell me how to sign in. Details: measuremy.site/llms.txtThe agent connects the measuremy.site MCP server. The prompt names that step, so your agent's permission checks know you asked for it. The full instructions are at /llms.txt.
2. Restart and sign in
A new MCP server loads in the next session, so restart when the agent asks (in Claude Code, claude -c keeps the conversation). Your browser opens on measuremy.site: sign in with a code sent to your email, or start a free trial, and enter the domain to track. Your email and domain never go through the agent, and no key is pasted anywhere.
3. It adds the script
The agent puts one script tag in your site's <head> (the layout file in Next.js, index.html in a single-page app, the theme header in WordPress) and tracks your own signups as an event. Client-side navigation is counted automatically.
<script defer src="https://a.measuremy.site/t.js" data-key="pk_..."></script>
4. Domain verification
Nothing is recorded until the domain is verified. When the script is live on your homepage, the first visit verifies it. If you load it through a tag manager, a DNS TXT record does the same.
5. Ask about your traffic
The agent is already connected. Try "give me an overview of the last 7 days".
Prefer to do it by hand? The install guide covers Next.js, React, Astro, WordPress, Webflow, Framer, Shopify, Squarespace, Wix, Ghost, Google Tag Manager and plain HTML.
Try it on your site
30-day free trial, no card. Plans from $9/month. Paste one sentence into your coding agent, or add one script tag yourself.
Start free trial See the live demoAdd measuremy.site analytics to this project: connect the measuremy.site MCP server at https://a.measuremy.site/mcp for all my projects (claude mcp add --scope user; it signs in with OAuth, no key, and one sign-in covers every site), then tell me how to sign in. Details: measuremy.site/llms.txt
Free tools
- Free UTM link builder: Add utm_source, medium and campaign to any link.
- Link shortener with click tracking: Short links with a click count by day and country.
- Analytics tag checker: Which analytics and pixels a site runs, plus duplicate and broken tags.
More guides
- A website analytics MCP server: ask your agent about your traffic
- Find out why your website traffic spiked
- Track clicks and find where visitors drop off, without writing code
- Cookieless analytics: how it works, and what you give up
- A simpler Google Analytics alternative for developers
- How to add analytics to your Next.js site
- How to add analytics to your Astro site
- How to add analytics to your Vite, React or Vue site
- How to add analytics to your SvelteKit site
- How to add analytics to your Hugo site
- How to add analytics to your Docusaurus site
- How to add analytics to your WordPress site