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
| Part | What it is |
|---|---|
| Name | What happened, such as $pageview or order_paid. |
| Distinct ID | Who did it. See How identifying works. |
| Timestamp | When it happened. |
| Properties | Details of this occurrence, such as the page address, the browser or the order value. |
| Person | The 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:
| Event | Sent when |
|---|---|
$pageview | A page loads, or a single-page app changes page. |
$pageleave | A visitor leaves a page. |
$autocapture | A visitor clicks, changes or submits an element. See Autocapture. |
$rageclick | A visitor clicks the same place repeatedly. |
$identify | You identify a visitor. |
$set | You set person properties without another event. |
$exception | An error is captured, if error capture is on. |
$web_vitals | Page 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_domainand 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$liband$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:
| Property | Shown as | Example |
|---|---|---|
$geoip_country_code | Country code | AU |
$geoip_country_name | Country name | Australia |
$geoip_subdivision_1_name | Subdivision 1 name | New South Wales |
$geoip_city_name | City name | Sydney |
$geoip_time_zone | Timezone | Australia/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.
Related
Can't find what you need? Contact support