/Docs
Register

Custom events

Track important user actions such as signups, downloads, form submissions, and feature clicks.

Track method

After the tracker script loads, Reignat exposes window.reignat.track(). Call it with a short event name when a meaningful action succeeds.

app.ts
window.reignat.track("signup")
eventName

string

The event label stored with the analytics event. Keep it stable so reports stay clean.

type

"custom"

The tracker sends custom events with the custom event type automatically.

path

string

The current page path is captured with the event, so you can see where actions happen.

sessionId

string

The browser session ID is attached so the event can be connected to the visit.

Examples

Track the moment that matters, not every click. For forms, call Reignat after validation and the server action both succeed.

checkout.tsx
async function handleSubmit(event) {  event.preventDefault()   const result = await submitSignupForm()  if (!result.ok) return   window.reignat.track("signup")}
pricing.tsx
function handlePlanClick(plan) {  window.reignat.track(`plan_selected_${plan}`)}

Naming

Use lowercase, predictable names such as signup, download_report, or contact_submit. Avoid dynamic values like email addresses, order IDs, or full URLs in event names.

If you need to compare events over time, treat event names like API names: stable, short, and boring.

Where to see events

Custom events appear in your project analytics and count toward monthly usage alongside pageviews. Pings, outbound links, transactions, and performance events are tracked separately and do not count toward monthly event usage.