Custom events
A custom event is an action you name and send to analytics yourself, such as Signup, Checkout Opened or Demo Booked. Unlike pageviews, which a script counts automatically, custom events fire only where your code or markup sends them. Properties add detail, for example plan=pro or source=footer.
By the Onfus teamUpdated 17 November 2026
Custom events
- Definition
- Named actions your own code sends to analytics, such as Signup or Checkout Opened, with optional properties.
How should you name custom events?
Use a short object-and-action name in the same style everywhere (Signup, Trial Started, Checkout Opened). Put variations in properties rather than in the name, so Signup with plan=pro and plan=solo stay one event you can split.
| Put it in | Example | Why |
|---|---|---|
| The event name | Signup | The action you count as a goal |
| A property | plan=pro | A variation you want to compare |
| Neither | email=jane@… | Personal data doesn't belong in analytics |
- The event name
- ExampleSignup
- WhyThe action you count as a goal
- A property
- Exampleplan=pro
- WhyA variation you want to compare
- Neither
- Exampleemail=jane@…
- WhyPersonal data doesn't belong in analytics
Event name vs property
Questions about custom events.
What are event properties?
Properties are key-value pairs attached to an event, such as plan=pro. They let you break one event down without creating many events. Avoid personal data such as email addresses in properties.
How does Onfus handle it?
Send custom events with window.onfus('Signup', { props: { plan: 'pro' } }) or the data-onfus-event attribute. Onfus shows each event with its properties, lets you use any event as a goal or funnel step, and caps properties at 20 keys and 1 KB per event.
Are custom events and goals the same?
Where do event properties show up?
Know what to fix by tomorrow.
Paste one line and start tracking in a minute. See where visitors drop off and what to fix. Free for 14 days, no cookie banner.