tinytrack() global function. Call it anywhere in your JavaScript to record any user interaction you care about — button clicks, form submissions, sign-ups, purchases, video plays, or any other meaningful action. Custom events give you a complete picture of what visitors actually do on your site, not just which pages they visit.
The script must be loaded before you call
tinytrack(). The defer attribute ensures this on standard page loads. For dynamically injected scripts, wait for the load event before calling the function.Basic Event Syntax
Calltinytrack() with the string 'event' as the first argument and your event name as the second:
Events with Properties
Pass an optional properties object as a third argument to attach structured metadata to your event:Common Use Cases
Viewing Custom Events in the Dashboard
After firing a custom event, it appears in your TinyTrack dashboard under the Goals & Events section. Here is what you can do there:- Filter by event name — click any event name in the list to scope the entire dashboard to visitors who triggered that event.
- View event counts over time — the trend chart updates to show event frequency across your selected date range.
- See property breakdowns — if you pass properties, TinyTrack groups and counts events by each property value so you can compare segments (e.g.
plan: provsplan: starter). - Build funnels — combine multiple events into a funnel to see conversion rates between steps, such as from
signup-click→signup→purchase.
Event Naming Conventions
Consistent naming makes your dashboard far easier to read and your funnels easier to build. Follow these conventions:- Use lowercase kebab-case —
signup-click,form-submit,plan-upgrade. Avoid camelCase, PascalCase, or spaces. - Be descriptive but concise —
video-playis better thanvand more readable thanuser-clicked-the-video-play-button. - Use a noun-verb or noun-action pattern —
trial-start,payment-complete,invite-sent. - Keep property keys consistent — if you use
sourceon one event, usesource(notchannelorutm_source) across all events to make cross-event filtering work reliably. - Avoid PII in event names or properties — never pass email addresses, user IDs, or any personally identifiable information as a property value.