Custom events and goals
A custom event counts something the tracker can't see on its own — like clicks on your Sign up button. Here's the snippet, where the result appears in your dashboard, and how to turn it into a goal.
What a custom event is
A custom event is an action you choose to send from your own code: window.atriqo.track(name, properties). The name is required; the properties are optional.
Names are 1 to 64 characters long and use only letters, digits, _ and - — no spaces, accents, dots or emoji. Names are case-sensitive: Signup_Click and signup_click are two different events. A name that breaks these rules is ignored silently: no error, and nothing reaches your dashboard — so check the spelling if an event doesn't appear.
Properties add detail to an event. You can send up to 10 properties per event; keys and values are cut at 64 characters, and values are sent as text — so send simple text values (an object would arrive as [object Object]).
Example: measure clicks on your Sign up button
This counts every click on a button and records which button it was, using a cta property:
<a id="signup" href="/signup">Sign up</a> <script> document.getElementById('signup').addEventListener('click', function () { if (window.atriqo) { window.atriqo.track('signup_click', { cta: 'hero' }); } }); </script>
The Atriqo snippet loads async, so window.atriqo doesn't exist until track.js has run. The code checks for it first: without that check, a click that lands before the script loads — or when it's blocked — would throw an error on your page. Attach the listener once: if it's attached again (for example on every re-render of a framework component), each click records one event per listener. A click that happens before the script has loaded isn't counted.
If you use a framework such as React, Vue or Svelte, put the same call in the component's click handler. You don't need to call anything manually for pageviews: the tracker already records a pageview on every client-side navigation.
Links that leave the page. The tracker sends events with fetch and keepalive, which is designed to survive navigation, so a click on a link that opens another page should still be reported. If the link goes to a different hostname (including a subdomain such as app.example.com), Atriqo also records it automatically as an outbound click while that setting is on for your site — your custom event is a second, separate event.
Atriqo uses this on its own site: the Sign up buttons on atriqo.com send a signup_click event with one property, cta, that says which button was clicked.
Where to see it
Open your site's overview and find the Events card, then choose the Custom tab. Each event name is listed with its count for the period you've selected, on every plan.
On the Growth and Business plans, expanding an event name shows its properties — each key with its values — so you can compare, say, cta=hero with another button. On other plans the card shows an upgrade line instead; your properties are still included in the CSV export.
Turn it into a goal
Goals are available on the Growth and Business plans. On other plans, goals can't be created — custom events still appear in the Events card.
- Open Site settings and go to the Goals tab.
- Click Add goal and give the goal a name.
- Set Type to Custom event.
- In Event name, enter the exact name you send — for example
signup_click.
The name is matched exactly, including capital letters. It can use only letters, digits, _ and - (up to 64 characters), and a name that Atriqo's automated personal-data filter would alter is not accepted.
A goal counts sessions that contain the event, not clicks. Ten clicks in one session are one conversion. A session in Atriqo is a fixed, clock-aligned 30-minute window, and the visitor identifier changes every day — so a conversion is only counted within a single session and a single day. There is no attribution across sessions or across days.
Results appear in the Conversions (same session) section of the overview. They cover the events recorded under that name during the period you've chosen — including events sent before the goal was created.
What it costs
Every custom event counts toward your monthly billable-events quota, and so does an outbound click recorded automatically. A Sign up button that links to a different hostname (for example a subdomain such as app.example.com) therefore records two events per click. Track meaningful actions — signups, purchases, form submissions — rather than high-frequency interactions. For how the quota works, see Plans, limits and billing.
Keep personal data out
Don't put personal data — emails, names, user IDs or free text — in event names or properties. Prefer a fixed vocabulary, such as cta=hero. Atriqo applies automated scrubbing to some patterns, but only as a best-effort safety net, not a guarantee: don't rely on it to clean up what you send.