Skip to content

Analytics Events ​

Pro & EnterpriseAnalytics requires a Pro or Enterprise subscription.
Compare plans

Detailed reference for all trackable events and their parameters.

Event Types ​

Area Events ​

Frontend EventBackend MappingAllowed Parameters
areaClickarea.clickid, name, floor
areaHoverarea.hoverid, name, floor
areaFocusarea.selectid, name, floor
areaBookmarkarea.selectid, name, floor

Marker Events ​

Frontend EventBackend MappingAllowed Parameters
markerClickmarker.clickid, name, floor
markerHovermarker.hoverid, name, floor
markerInfoOpenmarker.selectid, name, floor

Floor Events ​

Frontend EventBackend MappingAllowed Parameters
floorChangefloor.switchid, name, floor, fromFloor, toFloor
floorZoomFocusfloor.selectid, name, floor
floorLoadfloor.selectid, name, floor

Search Events ​

Frontend EventBackend MappingAllowed Parameters
searchQuerysearch.queryquery
searchResultClicksearch.selectquery, id, name
searchNoResultssearch.queryquery

Wayfinding Events ​

Frontend EventBackend MappingAllowed Parameters
routeRequestwayfinding.routeid, name, floor, originId, originName, originLevelId, originType, destinationId, destinationName, destinationLevelId, destinationType

Button Events ​

Frontend EventBackend MappingAllowed Parameters
customButtonClickbutton.clickid, name, floor, label, url, lang

Fires when a visitor taps the custom action button on an object card — the one conversion a map has. id / name / floor identify the place, label is the button text the visitor saw and url where it led.

Other Events ​

Frontend EventBackend MappingAllowed Parameters
zoomInzoom.in(none)
zoomOutzoom.out(none)
zoomChangezoom.change(none)
panMovezoom.change(none)
languageSwitchlanguage.switchfrom, to
viewSwitchview.switchfrom, to
shareshare.linkkind, id, name, from, to, mode, method
componentLoadedgeneral.componentLoadeddevice, language
componentUnmountedgeneral.componentUnmounted(none)
interactionTimegeneral.interactionTimedurationMs

componentLoaded carries device (mobile, tablet or desktop, decided by the embed from the pointer type and screen size) and language (the browser's BCP 47 tag, reduced to its primary subtag on the server: de-CH → de). Anything else is stored as unknown. The page the map was embedded on is not a parameter: it is taken from the ?parent= hostname the iframe already forwards for domain checks, so it cannot be set from the body. These three, one per map open, feed the Devices, Browser languages and Embedding sites widgets. interactionTime.durationMs is the time the map's tab was visible — the embed stops the clock while the tab is hidden — capped at one hour per visit when averaged.

Submitting Events ​

Events are submitted via the public API:

http
POST /api/p/{project_id}/analytics/
Content-Type: application/json

{
  "sessionId": "9f2c1c6f0b1d4e7a8c3b5d6e7f8a9b0c",
  "events": [
    {
      "event": "areaClick",
      "params": {
        "id": "area-uuid",
        "name": "Coffee Shop",
        "floor": "floor-1"
      },
      "timestamp": "2024-04-12T14:30:00Z"
    }
  ]
}

Session id ​

sessionId is a random token the map draws once per page load and sends with every batch of that visit. It lets the dashboard tie a visit's events together — engaged sessions, the session funnel, routes that never reached their destination floor — and nothing more: it is kept in memory only (no cookie, no storage), so it cannot recognise a returning visitor, and a page restored from the back/forward cache starts a new one. Accepted values are 8–64 characters of A–Z a–z 0–9 _ -; anything else is stored as empty. Events without a session id are counted everywhere except in the per-session widgets.

Parameter Notes ​

  • name is the entity title in the project's default language. Reports fall back to the current title stored on the area/marker when an event has no name.
  • For floorChange, floor is the destination level (fromFloor/toFloor record the transition). Reports group floor events by floor.
  • The zoom buttons emit zoomIn / zoomOut; wheel and pinch zoom emit zoomChange.
  • languageSwitch fires when a visitor uses the map's language button; from and to are language codes (it → nl). A language set by the page (lang, setLanguage()) is not an event — only the visitor's own switch.
  • viewSwitch fires when a visitor uses the map's 2D / 3D button; from and to are 2d or 3d. A view set by the page (view, setView()) is not an event — only the visitor's own switch.
  • share fires when a visitor uses the map's Share button. kind is place (with the place's id and name) or route (with from, to and, on a map with several route modes, mode); method is native (the system share sheet), clipboard (the link was copied), manual (shown to copy by hand) or qr (shown as a QR code). A share sheet the visitor closed is not an event.
  • customButtonClick carries the url that was opened — with {lang} filled in, or the language's own link — and lang, the language the map was in: which language's booking page gets the taps.
  • For routeRequest, originType / destinationType are area or marker. The route report resolves each endpoint against both tables rather than trusting the type, so these are stored for consumers of the raw event log (/analytics/events/), which otherwise cannot tell an area id from a marker id.
  • componentLoaded fires once the map is up and its configuration has loaded; componentUnmounted and interactionTime fire when the visitor leaves — including when they simply close the tab, not only on an SPA unmount.
  • areaFocus fires when a visitor selects an area from search, a deep link or the SDK. areaBookmark shares the same area.select definition but is raised only by the editor, so embedded maps never send it.

Parameter Validation ​

  • Only whitelisted parameters for each event type are accepted (see tables above)
  • Text is cut to a length by kind: ids (id, originId, destinationId, the level ids, from, to) 100 characters; names and floors 255; tags and url 500; short labels (mode, kind, method, source, lang, device, language, originType, destinationType) 40; everything else 200. These are the lengths the editor allows, so nothing the map itself sends is cut
  • Numbers must be finite, and whole numbers within ±2^53 (what a browser sends exactly); others are dropped
  • Only string, number and boolean values are kept — no lists or objects
  • Unknown event types are silently ignored, and so is an event of the wrong shape: the rest of its batch is recorded

Daily Limits ​

Per project and UTC day there are two: the plan's event quota (500,000 events on Pro, 5,000,000 on Enterprise) and a storage budget for the raw rows — the quota × 400 bytes, counting each row's ids, names and params. A raw row takes 60–220 bytes and a route request about 550, so a map that fills its event quota in ordinary use stays inside the storage budget; it is there for rows filled to the limit of every field.

Once either is spent, the rest of that day's events are not recorded — the endpoint keeps answering 204 — and the dashboard's Dropped events widget counts them.

What Is Stored ​

Every accepted event — except the hover events below — is added to the project's daily totals (the dashboard's counters, "All events" and /analytics/stats/). An individual raw row — kept 30 days, with its params — is written only for events a report reads one by one:

EventsRaw rowRead by
componentLoadedyesmap opens and visits for a chosen day, engaged sessions
interactionTimeyestime on the map for a chosen day, activity by hour
areaClick, markerClick, searchResultClickyespicks, most picked places, not picked, funnel
searchQuery, searchNoResultsyestop searches, searches with no result
routeRequestyestop destinations, top routes, unfinished routes
customButtonClickyesbuttons by place, funnel
floorChange, floorZoomFocusyesfloor views and switches, unfinished routes
floorLoadonly on maps with more than one levelfloor views, unfinished routes
zoomChange, zoomIn, zoomOut, panMove, filterApply, languageSwitch, viewSwitch, share, areaBookmarkyeszoom and pan per hour of a chosen day, busy hours
areaHover, markerHover, markerInfoOpennot recorded — no raw row, no daily total, no quotadesktop mouse traffic, never on a phone (markerInfoOpen fires when a hover shows a marker's tooltip). Still dispatched on <layota-map> for the embedding page when enabled
areaFocusno — daily total onlyit repeats the search pick or deep link that selected the area
componentUnmountedno — daily total onlyinteractionTime carries the visit's end

A raw row keeps id, name and floor in its own columns rather than again in params; /analytics/events/ returns them inside params as before. The postMessage / SDK events themselves are unchanged — this is only about what the server keeps.

SDK Events vs Analytics Events ​

Analytics events are tracked automatically by the embedded map. They are separate from SDK events (areaClick, markerClick, etc.) which are dispatched to your application code.

Layota Documentation