Lytical Docs
Browse the docs

Event definitions and the Visual Tagger

Updated December 1, 2026

The tracking code captures clicks, form submissions and pageviews automatically, but a raw click on button.btn-primary doesn't mean much in a report. An event definition gives matching events a business name, like "Add to Cart", "Newsletter Signup" or "Pricing CTA Click". You can then use that name in goals, funnels, filters and Quincy.

Event definitions match past events as well as new ones, so a definition you create today shows its full history straight away.

You can create definitions three ways: set rules yourself, point and click with the Visual Tagger, or accept a suggestion from Quincy.

Create a definition from rules

  1. Go to Conversions → Event Definitions and create a new definition.
  2. Under Basic Information, give it a name (for example "Homepage - Click - CTA Button"), an optional description, and a category to group related definitions.
  3. Under Matching Criteria, add one or more rules. All rules must match. You can match on:
    • Event type: click, form submission, pageview, outbound click and so on
    • Custom event name: equals or contains
    • Page: path equals, contains, starts with or matches a pattern (for example /products/*), or page title
    • Element: the clicked element's text, CSS selector, class, ID, tag, name or link URL
    • Form: form ID, name or action
    • Traffic: referrer, utm_source, utm_medium or utm_campaign
  4. Save. The definition's page shows every matching event.

Example: to track "Add to Cart" clicks on product pages, use Event type equals click, Path matches /products/* and Element text contains "Add to Cart".

Create a definition with the Visual Tagger

The Visual Tagger lets you define events by clicking on your own site.

  1. Go to Conversions → Visual Tagger and start a session.
  2. Open your site in a new tab using the button on the page. It opens with a temporary tagging token, so only your clicks are captured.
  3. Click the buttons and links, or submit the forms, that you want to track.
  4. Each interaction appears under Captured Interactions in Lytical as it happens. Name the ones you want to keep and save them as event definitions.
  5. Use Define Pageview to turn the page you're on into a pageview definition.

Your site needs the Lytical tracking code installed for the Visual Tagger to work.

Accept a suggestion from Quincy

Quincy watches your event patterns and suggests definitions under Quincy Suggestions at the top of the Event Definitions page, for example a frequently clicked "Get started" button. Accept a suggestion to create it, or dismiss it.

Create a definition from a raw event

In Analytics → Events Browser, click Create event definition from this event next to any event. Lytical fills in the rules from that event for you to adjust.

Using event definitions

  • Make one a goal using the Named Event goal type
  • Use one as a step in a funnel
  • See it over time in Analytics → Named Events
  • Ask Quincy: "How many Add to Cart clicks did we get from Paid Social?"

Event definitions or custom events?

Event definitions Custom events (lyt.track)
Needs code No Yes
Works on past data Yes Only from when the code is added
Can carry extra data (order value, plan name) No Yes
Breaks if the page design changes Can, if selectors change No

Use event definitions for quick wins and anything you can see on the page. Use custom events for important conversions, events that carry values, and anything that happens without a click (for example, a signup confirmed by your server).

Was this article helpful?

Still stuck?

Ask Quincy in the app, or email support@lytical.ai.