Source: https://measuremy.site/guides/funnels-and-click-tracking

[measuremy.site](https://measuremy.site/) / [Guides](https://measuremy.site/guides)

# Track clicks and find where visitors drop off, without writing code

Pageviews tell you people arrived. To know whether they did anything, you need events, and to know where they gave up you need a funnel.

## Track a click or a form submit with one attribute

Add `data-measuremysite-event` to any element. A click anywhere inside it counts, and a form is tracked when it is submitted. No JavaScript needed.

```
<a href="/signup" data-measuremysite-event="signup_click">Start free</a>
<button data-measuremysite-event="add_to_cart" data-measuremysite-props='{"sku":"tee-01"}'>Add to cart</button>
<form action="/subscribe" data-measuremysite-event="newsletter_submit">...</form>
```

For moments that aren't a click, such as a finished signup or a purchase, call `measuremysite.track("signup")` from your code. Props are optional; don't put personal data in them.

## Build a funnel

A funnel is 2 to 8 steps in order. A step that starts with `/` is a page (`/docs/*` matches everything under it); anything else is an event name.

```
/
/pricing
signup_click
signup
```

For each step you see how many visitors reached it, the share of the first step and of the previous step, and the biggest drop. That drop is where to look first: a missing button, a confusing page, a form that's too long.

## One thing to know

Visitors are matched within a single UTC day, because the anonymous visitor id changes every day. Someone who visits on Monday and signs up on Wednesday isn't followed across those days. For most sites the signup happens in the same visit, so the funnel is still a good guide.

## Ask your agent

"Create a funnel from the homepage to signup and tell me where people drop off." The agent calls `create_funnel` and `get_funnel`, and can add the tracking attributes to your pages for you.

### 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](https://measuremy.site/login) [See the live demo](https://measuremy.site/share/measuremy.site)

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.txt

## Free tools

- [Free conversion rate calculator](https://measuremy.site/tools/conversion-rate-calculator): Conversion rate from visitors and signups, plus the traffic needed for a goal.
- [UTM link checker](https://measuremy.site/tools/utm-link-checker): Find broken UTM tags and see which GA4 channel a link lands in.
- [Link shortener with click tracking](https://measuremy.site/tools/link-shortener): Short links with a click count by day and country.

[All free tools](https://measuremy.site/tools)

## More guides

- [A website analytics MCP server: ask your agent about your traffic](https://measuremy.site/guides/analytics-mcp-server)
- [Add website analytics to your project with Claude Code](https://measuremy.site/guides/claude-code-analytics)
- [Find out why your website traffic spiked](https://measuremy.site/guides/find-why-traffic-spiked)
- [Cookieless analytics: how it works, and what you give up](https://measuremy.site/guides/cookieless-analytics)
- [A simpler Google Analytics alternative for developers](https://measuremy.site/guides/google-analytics-alternative)
- [How to add analytics to your Next.js site](https://measuremy.site/guides/add-analytics-to-nextjs)
- [How to add analytics to your Astro site](https://measuremy.site/guides/add-analytics-to-astro)
- [How to add analytics to your Vite, React or Vue site](https://measuremy.site/guides/add-analytics-to-vite-react)
- [How to add analytics to your SvelteKit site](https://measuremy.site/guides/add-analytics-to-sveltekit)
- [How to add analytics to your Hugo site](https://measuremy.site/guides/add-analytics-to-hugo)
- [How to add analytics to your Docusaurus site](https://measuremy.site/guides/add-analytics-to-docusaurus)
- [How to add analytics to your WordPress site](https://measuremy.site/guides/add-analytics-to-wordpress)
