Custom Events
Send custom events to Hardal when the standard event catalog does not fit.
Send a custom event
Use a standard event when one matches the activity you are recording. Send a custom event when the standard catalog does not describe it.
Choose a clear, lowercase name and pass only the parameters the event needs.
<script>
virgo.track("quote_requested", {
plan: "enterprise",
seats: 250,
region: "EMEA"
});
</script>
<script>
window.virgo?.track?.("quote_requested", {
plan: "enterprise",
seats: 250,
region: "EMEA"
});
</script>
Naming events
These habits keep your reports clean:
- Use
snake_case:quote_requested, notQuote Requested. - Name the action, not the page:
video_played, notvideo_page. - Keep names stable. Renaming an event splits its history.
- Reuse a standard event name when one fits. This keeps the event schema consistent.
Parameter values
Parameters can be strings, numbers, or booleans. Use the same keys and types every time you send the event. If value is a number once, keep it a number.
virgo.track("filter_applied", {
filter_type: "price",
min: 50,
max: 200,
in_stock: true
});
In the browser Network panel, confirm the next /collect/ batch contains your event name and returns 202.
Standard Events
Check the standard events first. One might already fit.
Was this page helpful?