Skip to content
Glossary

Custom event

A custom event is an action you tell your analytics tool to record, such as a signup, a file download or a completed checkout. Page views show where people went; custom events show what they did there.

Updated

Also called: event, tracked event, event tracking

Definition

Every analytics script records page views on its own. A custom event is one you add: you choose the moment, give it a name, and often attach properties that describe it, like the plan someone chose. Events are the raw material for goals, funnels and revenue reports.

Sending a custom event to Linqry

From JavaScript, call window.linqry with a name, optional properties and an optional revenue amount in cents:

window.linqry('signup-completed');
window.linqry('signup-completed', { plan: 'pro', source: 'pricing-page' });
window.linqry('purchase', { plan: 'pro' }, 4900); // $49.00

Without writing JavaScript, add attributes to any element. A click fires the event, and each data-linqry-event-* attribute becomes a property:

<button data-linqry-event="demo-requested" data-linqry-event-location="hero">
  Book a demo
</button>

Events that happen on your server, like a renewed subscription, go to the HTTP API with the site's write key. The custom events docs and the API reference cover both routes.

What the tracker records on its own

You don't need to add these: pageview on every load and route change, pageleave with the time spent on the page, and outbound when someone clicks a link to another site, with the link's address. See outbound link.

Where events show up in Linqry

  • Top custom events: each event name with its count and the number of visitors who triggered it.
  • Goals and funnels: any event name can be a goal or a funnel step.
  • Visitor timelines: the properties of each event, in order, for one visitor's day.

Properties are stored with each event but the dashboard doesn't break counts down by property value. If you need separate numbers for two variants, give them separate event names.

Limits and naming tips

  • Names: 1 to 64 characters of letters, digits, spaces and _ . : / -. Anything else is rejected.
  • Properties: a flat object of up to 20 keys. String values are cut to 256 characters, and the whole object must stay under 4 KB.
  • Be consistent: pick one style, such as object-action in lowercase (signup-completed, invoice-paid), and keep it. Signup and signup are different events.
  • No personal data: don't put email addresses, names or user IDs in event names or properties.

Related terms

Frequently asked questions

Can I track events before the script has loaded?

Yes. Linqry's snippet includes a one-line queue, so calls made before the tracker loads are kept and sent once it arrives.

Is a custom event the same as a goal?

No. An event is a recorded action. A goal is an event or page you mark as a success so it gets a conversion rate.

Measure your own site without cookies

No card required · 30-day trial · No cookies