Event tracking: measure the clicks that matter with one line
Page views show where people go. Events show what they do there. With lalalytics, a custom event is one line of code – no tag manager, no cookies.
- No cookies
- GDPR compliant
- Hosted in Germany
- No personal data
Page views tell you which pages were read. But the moments that matter most often happen on a page: someone clicks “Add to cart”, sends the contact form, downloads your price list or starts a video. With event tracking in lalalytics, you measure exactly these actions – with one line of code, without cookies and without a tag manager.
Everything is an event
In lalalytics, all data is a chain of events. Each event is a data point at a certain time. The lalalytics snippet creates the standard event for you: a page view, sent with the page path, the referrer and a few general details such as browser and device (no personal data).
Custom events are your own additions. You decide what is worth measuring and give it a name. They appear in the dashboard next to everything else and work with all filters, conversion goals and funnels.
Your first custom event in one line
Once the snippet is on your site, the function lala(eventName, opts) is available. The most basic example is a button:
<button onclick="lala('myEvent')">Click here</button>
That is all. Every click sends the event myEvent to lalalytics, and it shows up in the events list of your dashboard.
You can call lala from your own JavaScript as well, for example when a form is sent:
document
.querySelector("#newsletter-form")
.addEventListener("submit", function () {
lala("newsletter signup");
});
Group related events with tags
Often, several events belong together. Pass a second parameter with tags, and you can filter and compare them as a group:
<button onclick="lala('add item', {tags: ['cart', 'product xy']})">Add Item</button>
<button onclick="lala('rmv item', {tags: ['cart', 'product xy']})">Remove Item</button>
<button onclick="lala('checkout', {tags: ['cart']})">Checkout</button>
Now the tag cart collects all shopping cart actions, and product xy shows everything that happened with one product. Tags have their own list in the dashboard and can be used as a filter, in goals and as an optional condition for a funnel step.
How to set up event tracking, step by step
- Add the snippet. In lalalytics, go to your site's settings, copy the snippet and add it to every page – usually inside the
<head>. In most CMS and shop systems you do this once in a central place. - Pick the actions that matter. Start small: sign-up, contact form, download, add to cart, checkout. Three to five events usually tell you more than fifty.
- Choose clear names. Use short, consistent names like
signup,download pricelist,checkout. You will read them in lists and filters later. - Call
lalawhere the action happens – in anonclick, a form handler or your shop's JavaScript. - Add tags if events belong together, e.g. a product, a campaign area or a step of a process.
- Use the events. Check the events list in the dashboard, then build a goal or a funnel from them.
What you can do with events
- Conversion goals: count the visits that reached a goal, e.g. the event
checkoutwith the tagcart, and follow the conversion rate over time. - Funnels: combine pages and events into steps, e.g. product page →
add item→checkout, and see where people give up. - A fairer bounce rate: a visit with a custom event never counts as a bounce. If your landing page has one call-to-action, track it as an event, and the bounce rate reflects real interest.
- Filters and comparisons: show only visits with a certain event, and see which sources and campaigns bring the visitors who act.
Privacy-friendly by design
Events in lalalytics need no cookies and store no personal data. One rule is important, though: do not put personal information into events. Event names and tags should describe actions (newsletter signup), never people (no e-mail addresses, names or customer numbers). That way, your analytics stays useful and privacy-friendly. In general, you do not need a consent banner for lalalytics.
All details on the snippet and the data it sends are in the documentation. Ready to measure your first click? Start the 30-day free trial – no credit card needed. Plans are based on events per month, see pricing.
Frequently asked questions
What is event tracking?
Event tracking measures actions on a page that are not page views – clicks on a button, a sent form, a download or a purchase. Each action is recorded as an event with a name and a point in time.
How do I track a button click in lalalytics?
Call the lala function with an event name, for example onclick="lala('signup')" on the button. The event appears in the events list of your dashboard.
Do I need Google Tag Manager?
No. The lalalytics snippet already provides the lala function. You call it directly in your HTML or JavaScript, wherever the action happens.
What are tags for?
Tags group events that belong together. For example, add item, remove item and checkout can all carry the tag cart, so you can filter and compare them as one group.
Can I send personal data with an event?
Please don't. Event names and tags should describe actions, never people – no e-mail addresses, names or customer numbers. That keeps your analytics privacy-friendly.
Do events count towards my plan?
Yes. Plans are based on events per month, and page views as well as custom events are events. The paid plans start at 100,000 events per month.