Page views tell you where people went. Custom events tell you what they did there. Clicking "Create account", finishing a checkout, playing a demo video or copying an install command are all actions a page view cannot capture on its own.
Different tools use different words for the same idea: events, custom events, conversions or goals. In Reveata they are called goals.
Sending a custom event
There are three common ways:
From JavaScript, when the action happens in your code:
jsreveata('goal', 'signup'); reveata('goal', 'checkout', { plan: 'pro', billing: 'yearly' });From HTML, without writing JavaScript. In Reveata, any element with
data-reveata-goalrecords a goal when clicked, and a form with it records the goal when submitted:html<button data-reveata-goal="signup">Create account</button>From your server, once the action is confirmed, for example with
reveata events sendand the visitor id from the browser (send goals from your server).
A tag manager can send them too, using the Reveata Analytics template's Track a goal tag (Google Tag Manager).
Naming custom events
Names become the labels in every report, so choose them once and keep them stable.
- Use verbs or outcomes:
signup,start_trial,invite_sent. - Group related events with a prefix:
checkout:started,checkout:paid. Reveata allows:for namespaces. - Keep variants in properties, not names: one
signupevent with aplanproperty is easier to read thansignup_proandsignup_free. See event properties.
In Reveata, goal names are lowercase letters, digits, _, - and :, up to 64 characters. Other characters become _, so Sign Up becomes sign_up. Names starting with billing: are reserved for the built-in subscription goals (Custom goals).
Events you may not need to build
Some actions are recorded without code. Reveata's script records scroll depth, time on page and outbound link clicks by default, and an opt-in extras script records broken links (404), file downloads and form submissions. Connected payment providers add subscription goals such as trial started, paid, renewed and cancelled.
Using custom events
- Goals by source. See which channels and campaigns lead to sign-ups, not just visits.
- Funnels. Line up pages and goals in order and see where people drop off (Funnels).
- Filters. Keep only visits that completed a goal, or did not.
- Alerts and webhooks. Get told when a goal is completed.
Pitfalls
- Counting clicks instead of outcomes. A click on "Buy" is not a purchase. Send the confirmed action from the server or the confirmation page.
- Firing before the script loads. Calls made too early are lost unless you add the queue snippet from Install the script.
- Too many events. Track the actions you will make decisions with. Each one also counts towards your plan's monthly events.
- Personal data in names. Never put emails or names in event names or properties.