Events: list of events
Learn from this article about: |
Events are collected behaviours of a customer.
Different types of information can be fetched depending on the event type.
Each event contains:
- Timestamp (time and date),
- Payload (varies for each event type, more details below).
Timestamp
The timestamp is recorded in the following format yyyy-mm-dd hh:mm:ss
In most cases, it shows when exactly an event happened in the browser (uses the clock set up in the browser).
Each time the event reaches the server there is also a reception side noted on the server-side that helps to verify timestamp noted in the browser.
Remember: By default, Meiro Events uses time recorded by the browser.
It is because it is the most precise as information travelling to the server may have a delay ( for example due to poor internet connection or other distractions).
Remember: But in cases when Meiro Events detects a discrepancy between time recorded by the browser versus time recorded by the server, the time recorded by the server will be used as the most accurate.
For example, it can happen that a user does not have time set up correctly on his device. In those cases, time noted by the server is perceived as the most correct one.
Timestamp from the browser is translated to UTC timezone and to the local timezone on the server-side.
Payload
Payload varies for each type of event. This is the data that is collected for a particular event.
For each event we know:
- User ID,
- Session ID
Types of events tracked by default
When you initialize ME SDK it starts collecting the events listed below automatically:
Page viewpage_view |
Initiated by a method call `MeiroEvents.track("pageView")`. The method also handles web banner conditions evaluation. Data collected from this event:
Learn more: How to set page view on the application and how to pass additional data.
|
Outbound Link Click
|
Initiated by method call `MeiroEvents.track("outboundLinkClick")`. If you don’t want to track these events, you can remove the method call from your SDK initialize script but you’ll also lose cross-domain tracking if you have it set. Data collected from this event:
|
Google CID sync
|
The event is sent once per session if the `_ga` cookie is found. Data collected from this event:
|
Facebook CID sync
|
The event is sent once per session if the `_fbp` cookie is found. Data collected from this event:
|
Optimizely data sync
|
The event is sent once per session if Optimizely is initialized on a website.
|
Web Banner Impression
|
The event is sent once some web banner is shown. Data collected from this event:
|
Web Banner Click
|
The event is sent if a user clicks on the displayed image banner pointing to some destination URL. Data collected from this event:
|
Additional types of events possible to track
Custom event
|
Data collected from this event type can be customised by the administrator of the website. The custom event can record any event possible to collect through JavaScript and JSON listeners. The list of trackable custom events can be found under this link.
Learn more: How to set custom event.
Example of the event:
|
Contact Form Submit
|
Data collected from this event:
Learn more: How to track contact form on the website.
|
Event enrichment
All the events sent by SDK may be enriched by additional data on the ME backend server:
Event type |
Description |
Cookies |
JSON object formatted as “cookie name”: “cookie value” |
Geolocation
|
Geolocation information containing city, country ISO, country name, latitude, longitude and postal code. |
Headers |
JSON object containing request headers in the format “header name”: “header value” |
Referer parts
|
Referrer information containing its name (referer), medium, search parameter or search term |
URL parts
|
Parsed URL into handy format containing host, path, query, query parsed object and scheme |
User agent
|
Parsed User-Agent header containing attributes: browser family, browser version, device family, device version, is bot, is mobile, is tablet, is touch capable, OS family and OS version. |
Page view event example enriched by the ME backend
{
"cookies": {
"_ga": "GA1.2.1111111111.1111111111",
"meiro_user_id": "fps9pfs7-5a25-4782-a8ea-f78a1ca24e79",
},
"geo_ip_data": {
"city_name": "Senica",
"country_iso": "SK",
"country_name": "Slovakia",
"latitude": 48.7498,
"longitude": 19.1895,
"postal_code": "974 01"
},
"headers": {
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-GB,en;q=0.9",
"Content-Length": "349",
"Content-Type": "application/json; charset=utf-8",
"Origin": "https://www.meiro.io",
"Referer": "https://www.meiro.io/",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/107.0.5304.66 Mobile/15E148 Safari/604.1",
"X-Forwarded-For": "85.232.231.195",
"X-Forwarded-Host": "events.meiro.io",
"X-Forwarded-Port": "443",
"X-Forwarded-Proto": "https",
"X-Forwarded-Server": "7422e9d33ade",
"X-Real-Ip": "85.232.231.195"
},
"method": "POST",
"payload": {
"page_title": "Become a Part of Meiro Team - Meiro",
"referrer": "https://www.google.com/",
"url": "https://www.meiro.io/career/"
},
"referer_parts": {
"known": true,
"medium": "search",
"referer": "Google",
"search_parameter": null,
"search_term": null
},
"session_id": "MTY2Nzk4MjU1ODQ3NyZlODU2ZBA5ZC01YTI2LTQ5ODItYThlYS1mNzhhMWNhMjRlNzk=",
"timestamp": "2022-11-09T08:32:18.478Z",
"type": "page_view",
"url_parts": {
"host": "www.meiro.io",
"path": "/career/",
"query": "",
"query_parsed": {},
"scheme": "https"
},
"user_agent": {
"browser_family": "Chrome Mobile iOS",
"browser_version": [
107,
0,
5304
],
"device_family": "iPhone",
"device_version": "Apple",
"is_bot": false,
"is_mobile": true,
"is_pc": false,
"is_tablet": false,
"is_touch_capable": true,
"os_family": "iOS",
"os_version": [
16,
0
]
},
"user_id": "fps9pfs7-5a25-4782-a8ea-f78a1ca24e79",
"version": "1.2.0"
}