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. Start with an event plan so each event has one successful trigger and a responsible sender.
The web script already collects scroll milestones and outbound_click when automatic tracking is enabled. Avoid sending the same interactions again from custom tags. If you send scroll_depth yourself, use a numeric percent of 25, 50, 75, 90, or 100; other values are rejected. See automatic events.
<script>
hrd.track("quote_requested", {
plan: "enterprise",
seats: 250,
region: "EMEA"
});
</script>
Wait for the tracker
Run these examples after the base tracker has loaded. The same HTML works in a Google Tag Manager Custom HTML tag. In GTM, the custom tag must run when the tracker API is available; starting the base tag first does not by itself establish readiness.
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.
hrd.track("filter_applied", {
filter_type: "price",
min: 50,
max: 200,
in_stock: true
});
Verify collection and reporting
Trigger one completed action
Use a realistic test value and confirm that the application has completed the action before sending the event.
Inspect the request
In the browser Network panel, confirm that the next collection batch contains your event name and parameters and returns 202.
Inspect the stored occurrence
Open Engagement → Events for the same source and period. Find the event and inspect its parameters and related session.
A 202 response acknowledges collection; it is not the final reporting check. Custom parameters provide event context and do not automatically become dashboard dimensions.
Choose the event in Key Events when it should count toward engagement, or in Acquisition's conversion configuration for campaign-credit analysis. These are separate settings. For mobile and backend senders, use the HTTP request format with event parameters inside payload.data.
Standard Events
Check the standard events first. One might already fit.