Glossary · Tracking technology

What are custom events in analytics?

Custom events are events you define and send to your analytics tool yourself — such as signup, demo_booked or plan_upgraded — to record actions that are specific to your product and can't be detected automatically.

Also called: Custom event tracking, Custom conversions

Updated

How to send a custom event

window.visitrack("signup", { plan: "pro", method: "email" })

Most tools offer three ways: a JavaScript call where your code knows the action succeeded, an HTML attribute on an element for simple click goals, and a server API for actions that happen outside the browser (webhooks, OAuth callbacks, jobs).

Custom event example

A SaaS sends signup after the account is created, project_created when the first project is saved, and invite_sent when a teammate is invited. A funnel of those three shows 1,000 sign-ups, 580 first projects and 140 invites in a month — and that teams who invite someone convert to paid at four times the rate of solo users. None of that is visible from pageviews.

Why custom events matter

Automatic tracking can't know which redirect means "signed up" or which button means "booked a demo." Custom events turn your analytics from a traffic counter into a record of outcomes, and they're the inputs for goals, funnels, activation and attribution.

Common custom event mistakes

  • Firing on button click instead of on confirmed success.
  • Reporting the same event from both browser and server.
  • Renaming events and splitting history.
  • Calling the tracker before it loads without a queue stub.
  • Personal data in properties.

Custom events in VisitTrack

Call window.visitrack("name", props) from your code (up to 10 properties per event; names up to 120 characters), add data-vt-goal="name" to any element to record clicks without JavaScript, use data-vt-scroll to fire an event when a section scrolls into view, or send events from your backend with /api/track. A one-line queue stub buffers calls made before the script loads. Use optional chaining (window.visitrack?.(…)) so an ad blocker can't break your sign-up flow. Full guide: custom events.

Frequently asked questions

How do I track a sign-up as a custom event?

Call your analytics tool's event function right after your sign-up request succeeds, for example window.visitrack("signup"). For sign-ups that complete on the server, such as OAuth, send the event from the server instead.

Are custom events counted as pageviews?

No. They are separate events. In usage-based pricing they may count toward your event allowance; in VisitTrack's pricing, pageviews, goal completions and payments are what count as events.

Related terms

Tools and guides

See which channels actually bring paying customers

VisitTrack is cookie-free analytics with revenue attribution built in. One script tag, no consent banner, live in two minutes. 14 days free, no card required.