Custom events with Monita Collect
Most monitoring watches requests that vendors already make. Sometimes the thing you want to monitor isn’t a vendor call at all — a data layer state, a user action, a condition in your own code. Monita Collect lets you send those as first-class events with one JavaScript call.
Set up
Section titled “Set up”-
Set up global monitoring on the property — Monita Collect rides on the same script.
-
Choose (or create) the vendor you want the events attributed to, and switch on Monita Collect for it.
-
Click the code icon next to the vendor to open its code panel — it shows the exact vendor name and a copy-paste snippet.
-
Call
monitaSendBeaconfrom your site’s JavaScript wherever the thing you care about happens:monitaSendBeacon('Monita', 'customEvent', {// any additional data you want on the event:url: window.location.href,pageCategory: 'landing',userId: 'user123',});The arguments are vendor name, event name, and an object of parameters. Use the exact vendor spelling from the code panel so events group (and get the vendor’s logo) in dashboards.
Verify
Section titled “Verify”- Trigger your custom event and watch the Network tab for a
POSTtocollect.monita.aireturning 204 — see Verifying network requests. - The event appears in the property’s Visualisation view under the vendor and event name you sent.
Custom events work everywhere ordinary events do: alert rules, data validation, signal volume and the data dictionary.