Skip to content

Events

What an event is, the events the web library sends for you, the properties events carry, and where to see and manage them.

An event is one thing that happened, at one moment: a page was viewed, a button was clicked, an order was paid. Every chart in My Journey Analytics is built from events, so it pays to know what they contain.

What an event holds

PartWhat it is
NameWhat happened, such as $pageview or order_paid.
Distinct IDWho did it. See How identifying works.
TimestampWhen it happened.
PropertiesDetails of this occurrence, such as the page address, the browser or the order value.
PersonThe person the distinct ID belongs to, with their person properties.

Once stored, an event does not change. If a person's properties change later, their past events keep the event properties they were sent with.

Events the library sends for you

Names that start with $ come from the library or the app itself. The ones you will see most often:

EventSent when
$pageviewA page loads, or a single-page app changes page.
$pageleaveA visitor leaves a page.
$autocaptureA visitor clicks, changes or submits an element. See Autocapture.
$rageclickA visitor clicks the same place repeatedly.
$identifyYou identify a visitor.
$setYou set person properties without another event.
$exceptionAn error is captured, if error capture is on.
$web_vitalsPage performance is measured, if web vitals autocapture is on.

Your own events, sent with myjourney.capture, appear alongside them; see Capturing events.

Properties the library adds

Every event from the web library carries properties about its context, so you can filter and break down without sending them yourself. They include:

  • the page: $current_url, $host, $pathname;
  • where the visitor came from: $referrer, $referring_domain and any UTM parameters in the address;
  • the device: $browser, $os, $device_type, screen and viewport sizes;
  • the visit: $session_id, and the library's own $lib and $lib_version.

Location properties

New projects look up each event's location from the visitor's IP address when the event arrives. This adds properties such as:

PropertyShown asExample
$geoip_country_codeCountry codeAU
$geoip_country_nameCountry nameAustralia
$geoip_subdivision_1_nameSubdivision 1 nameNew South Wales
$geoip_city_nameCity nameSydney
$geoip_time_zoneTimezoneAustralia/Sydney

The continent, postcode and approximate latitude and longitude are added too. Use these properties to filter or break down any insight, for example by country.

An event with no IP address, or with the property $geoip_disable set to true, gets no location. Location still works when the project discards IP addresses; see IP addresses.

See your events

  • Activity → Live shows events as they arrive.
  • Activity → Events lets you search and filter past events and choose the columns shown. Open an event to see all of its properties.
  • Data → Event definitions lists every event name your project has received, with how recently it was seen; see Data management.

Event timestamps

The library records the time on the visitor's device and corrects it for any difference between the device clock and ours. A timestamp more than 23 hours in the future is replaced with the time the event arrived. If an event's timestamp cannot be read, the event is kept with the time it was processed, and an ingestion warning is recorded.

Group events with actions

To treat several events as one, such as signups from three different forms, create an action.

Can't find what you need? Contact support