---
title: "Framer Help: How to track custom events in Framer"
description: You can track custom events on your Framer site using code, giving you full flexibility to measure any type of interaction.
published: "Nov 6, 2026, 11:03 AM UTC"
---

# How to track custom events in Framer

You can track custom events on your Framer site using code, giving you full flexibility to measure any type of interaction.

To track custom events on your site, use Framer’s `useTracking()` hook to obtain a `track()` function. You can pass in a tracking ID, which will appear in your analytics dashboard and can be used in Funnels and A/B testing. This is useful for tracking custom interactions beyond link clicks and form submissions.\
\
**Important:** The tracking ID must be in lowercase and use hyphens to separate words (e.g., `my-tracking-id`). If it is not in this format, it will not be tracked. See [Interaction](../../../dictionary/interaction). 

### [Example 1: Code Override](#example-1-code-override)

```
import { useTracking } from "framer"
import { ComponentType, forwardRef } from "react"

export function withClickTracking(Component): ComponentType {
    return forwardRef((props, ref) => {
        const track = useTracking()

        const onClick = () => {
            track("track-with-override")
        }

        return <Component ref={ref} {...props} onClick={onClick} />
    })
}
```

### [Example 2: Code Component](#example-2-code-component)

```
import * as React from "react"
import { ControlType, addPropertyControls, useTracking } from "framer"

export function TrackingButton({ trackingId, text }) {
    const track = useTracking()

    return (
        <button
            style={{
                padding: "12px 20px",
                fontSize: "16px",
                cursor: "pointer",
                borderRadius: "6px",
                border: "1px solid #ccc",
            }}
            onClick={() => {
                if (trackingId) {
                    track(trackingId)
                }
            }}
        >
            {text}
        </button>
    )
}

addPropertyControls(TrackingButton, {
    text: {
        title: "Title",
        type: ControlType.String,
        defaultValue: "Button Title",
    },
    trackingId: {
        title: "Tracking",
        type: ControlType.TrackingId,
        placeholder: "ID",
    },
})
```

### [Viewing results for custom events](#viewing-results-for-custom-events)

To view analytics for custom events, add a step in your funnel with the type **custom**, then enter the tracking ID of the custom event.

### [Recording tracking events in an external system (Rudderstack, Segment, GA, etc.)](#recording-tracking-events-in-an-external-system-(rudderstack-segment-ga-etc.))

To record tracking events in Google Analytics or another external system, see [the custom](../how-to-track-links-and-forms-in-framer/#record-tracking-events-in-an-external-system-(rudderstack-segment-ga-etc.))`[framer:xxx](../how-to-track-links-and-forms-in-framer/#record-tracking-events-in-an-external-system-(rudderstack-segment-ga-etc.))`[DOM events Framer emits](../how-to-track-links-and-forms-in-framer/#record-tracking-events-in-an-external-system-(rudderstack-segment-ga-etc.)).

#### FAQ

### How do I track custom events in Framer?

To track custom events on your site, use Framer’s useTracking() hook to obtain a track() function. You can pass in a tracking ID, which will appear in your analytics dashboard and can be used in Funnels and A/B testing. This is useful for tracking custom interactions beyond link clicks and form submissions.

### What format should my tracking ID use for custom events in Framer?

The tracking ID must be in lowercase and use hyphens to separate words (e.g., my-tracking-id). If it is not in this format, it will not be tracked.

### How can I view analytics for my custom events in Framer?

To view analytics for custom events, add a step in your funnel with the type custom, then enter the tracking ID of the custom event.

Updated

2026年9月15日

## Your next idea starts here

Create personal portfolio, Build startup site, `Launch landing page`, Start company blog

[Start without AI](https://framer.com/signup)

---

## Navigation

- [Enterprise](../../../enterprise/)
- [Pricing](../../../pricing)
- [Log in](https://framer.com/login)
- [Sign up](https://www.framer.com/r/signup/)
- [Brand guidelines](../../../brand)
- [Help center](../../)
- [Data](../../analytics/)
- [AI](../../../ai/)
- [Agents](../../../agents/)
- [MCP New](../../../mcp/)
- [Design](../../../design/)
- [Collaborate](../../../collaborate/)
- [CMS](../../../cms/)
- [Hosting](../../../hosting/)
- [Performance](../../../performance/)
- [Analytics](../../../analytics)
- [SEO](../../../seo/)
- [Skills New](../../../skills)
- [Convert](../../../convert/)
- [Publish](../../../publish/)
- [Updates](../../../updates)
- [Templates](https://www.framer.com/community/marketplace/templates/)
- [Components](https://www.framer.com/community/marketplace/components/)
- [Vectors](https://www.framer.com/community/marketplace/vectors/)
- [Plugins](https://www.framer.com/community/marketplace/plugins/)
- [Gallery](https://www.framer.com/community/gallery/)
- [Hire Experts](https://www.framer.com/community/members/)
- [Switch New](../../../switch/)
- [Agencies](../../../agencies/)
- [Startups](../../../startups/)
- [Academy](../../../academy/)
- [Desktop App](../../../downloads/)
- [Developers](../../../developers/)
- [Affiliates](../../../creators)
- [Experts New](../../../expert/apply/)
- [Guides](../../../guides)
- [Blog](../../../blog/)
- [Newsletter](../../../newsletter)
- [Stories](../../../stories/)
- [Skills Index New](../../../skills/index)
- [Students](../../../education/students/)
- [Ambassadors](../../../)
- [Help Articles](../../)
- [Meetups](../../../meetups/)
- [Contact](../../../contact/)
- [Designers](../../../solutions/designers/)
- [Agencies](../../../solutions/agencies/)
- [Marketers](../../../solutions/marketers/)
- [Growth](../../../solutions/growth/)
- [Builders](../../../solutions/builders/)
- [Engineers](../../../solutions/engineers/)
- [Site Teams](../../../solutions/site-teams/)
- [Founders](../../../solutions/founders/)
- [AI website builder](../../../solutions/ai-website-builder/)
- [AI design agent](../../../solutions/ai-designer/)
- [Pro sites](../../../solutions/website-builder/)
- [Landing pages](../../../solutions/landing-pages/)
- [Portfolio maker](../../../solutions/portfolio-website/)
- [UI/UX design](../../../solutions/ui-ux-design/)
- [Figma to HTML](../../../solutions/figma-to-html/)
- [No-code](../../../solutions/no-code-website-builder/)
- [Compare](../../../compare)
- [Webflow](../../../compare/framer-vs-webflow)
- [Figma](../../../compare/framer-vs-figma)
- [Wix](../../../compare/framer-vs-wix)
- [Squarespace](../../../compare/framer-vs-squarespace)
- [WordPress](../../../compare/framer-vs-wordpress)
- [Readymag](../../../compare/framer-vs-readymag)
- [Ceros](../../../compare/framer-vs-ceros)
- [Unbounce](../../../compare/framer-vs-unbounce)
- [Lovable](../../../compare/framer-vs-lovable)
- [Claude Code](../../../compare/framer-vs-claude-code)
- [ChatGPT](../../../compare/framer-vs-chatgpt)
- [Codex](../../../compare/framer-vs-codex)
- [Contentful](../../../compare/framer-vs-contentful)
- [Sanity](../../../compare/framer-vs-sanity)
- [AEM](../../../compare/framer-vs-adobe-experience-manager)
- [Replit](../../../compare/framer-vs-replit)
- [Astro](../../../compare/framer-vs-astro)
- [v0](../../../compare/framer-vs-v0)
- [About New](../../../about)
- [Careers](../../../careers/)
- [Security](../../../legal/security)
- [Brand](../../../brand)
- [Abuse](mailto:abuse@framer.com)
- [Legal](../../../legal/community-terms)
- [Trust](https://app.eu.vanta.com/framer.com/trust/ow67ujg7iav0t6qtd1o6r2)
- [Merch](../../../store)
- [Keyboard](../../../f1)
- [Stack Score](../../../stack-score/)
- [Free domains](../../../domains/)
- [CanvasBench](../../../canvasbench/)
- [State of Sites](https://www.framer.com/state-of-sites-2026/)
- [AEO scanner](../../../aeo)
- [Link Preview](https://www.linkpreview.app/)
- [Checking status](https://www.framerstatus.com/)
