Data Type | Description |
---|---|
Client Framework data (JSON) | If you are using step-based eventing, data from the client framework is submitted in JSON format and is available through Browser Based Replay for review and eventing. The JSON data format is documented here with examples. For information about creating Tealeaf events based on this data format can be found here: Step-Based Eventing. |
Message header properties
All messages contain message header properties consisting of two properties that contain the message type and the time that is offset from the start of the session in milliseconds. All time measurements in the JSON object schema are in milliseconds.
Message list
This table lists and describes the supported JSON message types:
Type | Message Type | Description |
---|---|---|
1 | Client state (Type 1) messages | Any object that shows the current state of client. |
2 | ScreenView (Type 2) messages | Any message that indicates changes in view on the "screen". The "screen" is the page, view, or activity where the visitor is in the application. |
3 | Connections (Type 3) messages | Any request or response that the application performs during capture. |
4 | Control (Type 4) messages | User interface control that fires an event to which Acoustic Tealeaf listens for capture. |
5 | Custom Event (Type 5) messages | Any custom log event from any location in application. |
6 | Exception (Type 6) messages | Any exception that the application can throw. |
7 | Performance (Type 7) messages | Performance data from a browser. |
8 | Web Storage (Type 8) messages | Any object that contains information about local storage information on the browser. |
9 | Overstat Hover Event (Type 9) messages | Any object that contains information about mouse hover and hover-to-click activity. |
10 | Layout (Type 10) messages | Any message that shows the current display layout of a native page. |
11 | Gesture (Type 11) messages | Any message that shows a gesture that fires a higher touch event that Acoustic Experience Analytics (Tealeaf) listens to for capture. |
12 | DOM Capture (Type 12) messages | Any object that contains serialized HTML data (DOM snapshot) of the page. |
13 | GeoLocation (Type 13) messages | Messages that contain the geolocation information about the device. |
14 | Cookie (Type 14) messages | Messages that contain the cookie data for the application. |
Message header properties
All messages contain message header properties consisting of two properties that contain the message type and the time that is offset from the start of the session in milliseconds.
All time measurements in the JSON object schema are in milliseconds.
Message header properties schema
This example shows the schema for the JSON message headers.
"offset": { "title": "Milliseconds offset from start of stream", "type": "integer", "required": true },"screenViewOffset": { "title": "Milliseconds offset from start of ScreenView", "type": "integer", "required": true },"count": { "title": "The number of the message being sent", "type": "integer", "required": only used for UIC },"fromWeb": { "title": "Used to identify if it came from Web or Native application", "type": "boolean", "required": true },"webviewId": { "title": "Used to identify which webview it came from. This is only used when fromWeb is true and it is a hybrid application ", "type":"string", "required": true only when fromWeb is true and it is a hybrid application },"type": { "title": "Message header type", "type": [ { "enum": [1], description: "CLIENT_STATE" }, "enum": [2], description: "APPLICATION_CONTEXT" }], "enum": [3], description: "CONNECTION" }, "enum": [4], description: "CONTROL" }, "enum": [5], description: "CUSTOM_EVENT" }], "enum": [6], description: "EXCEPTION" }], "required": true },
Client state (Type 1) messages
Client state messages are delivered on a schedule basis or on changes to the environment state on the client. These are Type 1 JSON messages.
Note: Replay of client state messages is not supported, except for scroll events. Replay of scroll events that are captured from the client is supported for mobile sessions only in BBR only.
Client State (Type 1) message schema
This is the schema for the Client State (Type 1) messages.
{ "$ref" : "MessageHeader", "mobileState": { "description": "Logical page being loaded for iOS and Android", "type": "object", "properties": { "orientation": { "title": "Current orientation of the device", "type": "integer", "required": true }, "freeStorage": { "title": "Amount of available storage in Mbytes", "type": "number", "required": true }, "androidState": { "description": "Current state in an Android device", "type": "object", "properties": { "keyboardState": { "title": "Current keyboard state", "type": [ { "enum": [0], description: "Keyboard not hidden" }, "enum": [1], description: "Keyboard hidden" }, "enum": [2], description: "Undefined" }], "required": true }, } }, "battery": { "title": "Battery level from 0 to 100", "type": "number", "required": true }, "freeMemory": { "title": "Amount of available memory in Mbytes", "type": "number", "required": true }, "connectionType": { "title": "Current connection type", "type": "string", "required": true }, "carrier": { "title": "Carrier of device", "type": "string", "required": true }, "networkReachability": { "title": "Current network reachability", "type": [ { "enum": [0], description: "Unknown" }, "enum": [1], description: "NotReachable" }, "enum": [2], description: "ReachableViaWIFI" }, "enum": [3], description: "ReachableViaWWAN" }], "required": true }, "ip": { "title": "Ip address of device", "type": "string", "required": true } }, "additionalProperties" : false "clientState": { "description": "Logical web page being loaded for UIC", "type": "object", "properties": { "pageWidth": { "title": "Width of the document of the web page", "type": "integer", "required": true }, "pageHeight": { "title": "Height of the document of the web page", "type": "integer", "required": true }, "viewPortWidth": { "title": "Width of viewport", "type": "integer", "required": true }, "viewPortHeight": { "title": "Height of viewport", "type": "integer", "required": true }, "viewPortX": { "title": "x position of scrollbar on viewport", "type": "integer", "required": true }, "viewPortY": { "title": "y position of scrollbar on viewport", "type": "integer", "required": true }, "event": { "title": "event that triggered the client state", "type": "string", "required": true }, "deviceScale": { "title": "scaling factor for fitting page into window for replay", "type": "integer", "required": true }, "viewTime": { "title": "time in milliseconds user was on the event triggered", "type": "integer", "required": true }, "viewPortXStart": { "title": "initial start x position of scrollbar on viewport", "type": "integer", "required": only used in scroll events }, "viewPortYStart": { "title": "initial start y position of scrollbar on viewport", "type": "integer", "required": only used in scroll events }, }, "additionalProperties" : false } }
Client State (Type 1) message example
This is an example of a Client State (Type 1) message. This example comes from an Android native application.
{ "offset": 667, "screenViewOffset": 4556, "type": 1, "mobileState": { "orientation": 0, "freeStorage": 33972224, "androidState": { "keyboardState": 0 }, "battery": 50, "freeMemory": 64630784, "connectionType": "UMTS", "carrier": "Android", "networkReachability": "ReachableViaWWAN", "ip": "0.0.0.0" } }
ScreenView (Type 2) messages
ScreenView messages indicate steps in a visitor's experience with your application. These steps can be logical page views in a web application, screen changes in a mobile application, or steps in a business process. ScreenView messages are Type 2 JSON messages.
ScreenView (Type 2) message schema
This is the schema for the ScreenView (Type 2) JSON messages.
{ "$ref" : "MessageHeader", "dcid": { "title": "Unique identifier that is used to match the corresponding DOM Capture message associated with this message.", "type": "string", "required": false }, "screenview/context": { "description": "Logical page being loaded or unloaded", "type": "object", "properties": { "type": { "title": "Type of application context - LOAD or UNLOAD", "type": "string", "required": true }, "name": { "title": "Name of the logical page. This is given by customer or it uses name of the class used by the page.", "type": "string", "required": true }, "url": { "title": "URL path of the logical page", "type": "string", "required": false only used in UIC }, "host": { "title": "URL Host of the logical page", "type": "string", "required": false only used in UIC }, "referrer": { "title": "Previous logical page loaded, only used in LOAD", "type": "string", "required": false }, "referrerUrl": { "title": "Url of the previous logical page loaded", "type": "string", "required": false, not used in UIC } }, "additionalProperties" : false, "required": false } }
ScreenView (Type 2) message example
This is an example of a ScreenView (Type 2) message. This example contains three ScreenView messages, indicating page load and page unload events.
{ "offset": 124, "contextOffset": 4556, "type": 2, "context": { "type": "LOAD", "name": "PAGE 2", "referrer": "PAGE 1" } } { "type": 2, "offset": 19216 "context": { "type": "UNLOAD", "name": "PAGE 2" } } { "type": 2, "offset": 2144, "contextOffset": 0, "count": 9, "fromWeb": true, "webviewId": "webview1", "screenview": { "type": "LOAD", "name": "Ford", "url": "/dynamic/ford.aspx", "host": "http://www.cartest.com", "referrer": "BMW", "referrerUrl": "/dynamic/bmw.aspx" } }
Connections (Type 3) messages
Connection messages provide information about how requests or responses are managed by the client application. Connections messages are Type 3 JSON messages.
Connections (Type 3) messages schema
This is the schema for Connections (Type 3) JSON messages.
{ "$ref" : "MessageHeader", "connection": { "description": "Connection in application", "type": "object", "properties": { "statusCode": { "title": "Status code of connection", "type": "integer", "required": true }, "responseDataSize": { "title": "Response data size", "type": "number", "required": true }, "initTime": { "title": "Initial time of connection", "type": "number", "required": true }, "responseTime": { "title": "Response time of connection", "type": "number", "required": true }, "url": { "title": "Url of connection", "type": "string", "required": true }, "loadTime": { "title": "Load time from connection", "type": "number", "required": true } }, "additionalProperties" : false } }
Connections (Type 3) message example
This example shows the Connections (Type 3) JSON message.
{ "offset": 03829, "type": 3, "screenViewOffset": 45560, "type": 3, "connection": { "statusCode": 200, "responseDataSize": 0272, "initTime": 01333669478556, "responseTime": 02237, "url": "http://google.com", "url": "/store/js/tealeaf/ TeaLeafTarget.php??width=540&height=960&orientation=0", "loadTime": 0 } }
Control (Type 4) messages
Control messages are used to log user action and behavior. These messages consist of a control identifier and a value that is returned by the identified control. Control messages are Type 4 JSON messages.
The control identifiers are mapped to specific controls for the submitting client framework. The value can be a number, a text string, or structured data.
Control (Type 4) message schema
This is the schema for Control (Type 4) messages.
The X and Y properties are not present in the UI Capture frameworks.
{ "$ref" : "MessageHeader", "offset": { "title": "Milliseconds offset from offset for when focusIn of text fields occur", "type": "integer", "required": true }, "target": { "description": "Control being logged", "type": "object", "properties": { "position": { "description": "Position of control being logged", "type": "object", "properties": { "x": { "title": "X of the control", "type": "integer", "required": true }, "y": { "title": "Y of the control", "type": "integer", "required": true }, "height": { "title": "height of control", "type": "integer", "required": true }, "width": { "title": "width of control", "type": "integer", "required": true }, "relXY": { "title": "relative X & Y ratio that can be from 0 to 1 with a default value of 0.5", "type": "string", "required": true for click events }, }, "additionalProperties" : false } "id": { "title": "Id/Name/Tag of control", "type": "string", "required": true }, idType": { "title": "Indicates what id is based on: Native id (e.g. HTML 'id' attribute): -1, xPath: -2, or Custom attribute for UIC and Hashcode value for Native: -3, or xPath for Native iOS/Android: -4", "type": "integer", "required": true }, "dwell": { "title": "Dwell time of control", "type": "integer value that is in milliseconds", "required": false }, "visitedCount": { "title": "Number of times a form control has been visited to be filled by user.", "type": "integer", "required": false }, "isParentLink": { "title": "To indicate if control a A type tag", "type": "boolean", "required": false only in UIC for usability }, "name": { "title": "Name of control", "type": "string", "required": true in UIC }, "type": { "title": "Type of control", "type": "string", "required": true }, "subType": { "title": "SubType of control", "type": "string", "required": true }, "tlType": { "title": "tlType of control that normalizes the control type for eventing", "type": "string", "required": true }, "prevState": { "title": "Previous state of control", "type": "object", "required": true, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } }, "currState": { "title": "Current state of control", "type": "object", "required": true, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } } }, "additionalProperties" : false } "event": { "description": "Event from control", "type": "object", "properties": { "tlEvent": { "title": "Tealeaf type of event", "type": "string", "required": true }, "type": { "title": "Type of event", "type": "string", "required": true }, "subType": { "title": "Subtype of event", "type": "string", "required": true } }, "additionalProperties" : false } }
Control (Type 4) message example
This is an example of a Control (Type 4) message.
This example shows a control with an idType of XPATH, which means no id was assigned to the control in the application so Tealeaf® traversed the layout and created an XPATH id for the control:,
{ "screenviewOffset":380, "target":{ "id":"[KV,0]", "position":{ "y":331, "x":0, "width":320, "height":202 }, "idType":"-4", "currState":{ "y":"0", "x":"0" }, "style":{ "paddingTop":2, "textBGAlphaColor":255, "bgAlphaColor":255, "paddingBottom":0, "paddingLeft":0, "hidden":false, "paddingRight":0 }, "subType":"View", "type":"KeyboardView", "tlType":"keyboard" }, "type":4, "offset":728, "count":3, "fromWeb":false, "event":{ "type":"UIKeyboardDidShowNotification", "tlEvent": "kbDisplayed" } },
Custom Event (Type 5) messages
The Custom Event messages are used to custom log any event from any place in the application. Custom Event messages are Type 5 JSON messages.
Custom Event (Type 5) message schema
This is the schema for the Custom Event (Type 5) messages.
The only required field is the name of the custom event (name value). Application-specific code must be created to process this logged message type.
{ "$ref" : "MessageHeader", "customEvent": { "description": "Custom event message", "type": "object", "properties": { "name": { "title": "Exception name/type", "type": "string", "required": true }, "data": "Additional properties given by developer", "type": "object", "required": truefalse, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } }, }, "additionalProperties" : false } }
Custom Event (Type 5) message example
This is an example of a Custom Event (Type 5) message. This custom event message provides the name of the custom event (MyEvent_1) and several custom properties in the data section.
{ "type": 5, "offset": 17981, "screenViewOffset": 4556, "customEvent": { "name": "MyEvent_1", "data": { "Foo": "Bar", "validationError": "Invalid zipcode.", "ajaxPerformance": 56734 } } }
Exception (Type 6) messages
The exceptions messages type records the name and description of an exception occurring on the client application. Exception messages are Type 6 JSON messages.
Exception (Type 6) message schema
This is the schema for the Exception (Type 6) messages.
{ "$ref" : "MessageHeader", "exception": { "description": "Exception description message", "type": "object", "properties": { "description": { "title": "Exception message from api call", "type": "string", "required": true }, "name": { "title": "Exception name/type", "type": "string", "required": true, not for UIC }, "stackTrace": { "title": "Exception stacktrace given by framework", "type": "string", "required": true, not for UIC }, "url": { "title": "Url where exception ocurred", "type": "string", "required": true for UIC }, "fileName": { "title": "File name where exception ocurred", "type": "string", "required": true for iOS, not for UIC }, "line": { "title": "Line number where eception occurred.", "type": "string", "required": true for UIC and iOS }, "unhandled": { "title": "Whether exception had a try catch around it.", "type": "boolean", "required": true, not for UIC }, "data": { "title": "User defined data being passed with user info from system", "type": "object", "required": true for iOS, not for UIC "properties": { "userInfo": { "type": "object", "title": "OS information from error or exception", "required": iOS optional (data is JSON serializable or not) }, "message": { "type": "string", "title":"User supplied message on error event", "required":iOS optional (not on exceptions required on error) } }, }, }, "additionalProperties" : false } }
Exception (Type 6) message example
This is an example of an Exception (Type 6) message. This example exception indicates an attempt to read a property named 'type' of a variable or value which is undefined.
{ "type" : 6, "offset" : 4606, "screenviewOffset" : 4603, "count" : 3, "fromWeb" : true, "exception" : { "description" : "Uncaught TypeError: Cannot read property 'type' of undefined", "url" : "http://www.xyz.com/js/badscript.js", "line" : 258 } }
Performance (Type 7) messages
Performance messages show performance data from a browser. Performance messages are Type 7 JSON messages.
Performance (Type 7) message schema
This is the schema for Performance (Type 7) messages.
{ "$ref" : "MessageHeader", "performance": { "description": "Performance message", "type": "object", "properties": { }, "additionalProperties" : false } }
Performance (Type 7) message example
This is an example of a Performance (Type 7) message.
{ "type": 7, "offset": 9182, "screenviewOffset": 9181, "count": 3, "fromWeb": true, "performance": { "timing": { "redirectEnd": 0, "secureConnectionStart": 0, "domainLookupStart": 159, "domContentLoadedEventStart": 2531, "domainLookupEnd": 159, "domContentLoadedEventEnd": 2551, "fetchStart": 159, "connectEnd": 166, "responseEnd": 1774, "domComplete": 2760, "responseStart": 728, "requestStart": 166, "redirectStart": 0, "unloadEventEnd": 0, "domInteractive": 2531, "connectStart": 165, "unloadEventStart": 0, "domLoading": 1769, "loadEventStart": 2760, "navigationStart": 0, "loadEventEnd": 2780, "renderTime": 986 }, "navigation": { "type": "NAVIGATE", "redirectCount": 0 } } }
Web Storage (Type 8) messages
Web Storage messages are any objects that contain information about local storage information on the browser. Web Storage messages are Type 8 JSON messages.
Web Storage (Type 8) message schema
This is the schema for the Web Storage (Type 8) messages.
"$ref" : "MessageHeader", webStorage: { key : “string”, value: “string”, }
Web Storage (Type 8) message example
This is an example of a Web Storage (Type 8) message.
{ type: 8, offset: 25, screenviewOffset: 23, count: 2, fromWeb: true, webStorage: { key: "vistCount" value: "5" } }
Overstat Hover Event (Type 9) messages
Overstat Hover Event messages are any object containing information about mouse hover and hover-to-click activity. Overstat Hover Event messages are Type 9 JSON messages.
Overstat Hover Event (Type 9) message schema
This is the schema for Overstat Hover Event (Type 9) messages
"$ref" : "MessageHeader", event: { xPath: "string", hoverDuration: int, hoverToClick: boolean, gridPosition: { x: int, y: int } }
Overstat Hover Event (Type 9) message example
This is an example of a Overstat Hover Event (Type 9) message.
{ type: 9, offset: 25, screenviewOffset: 23, count: 2, fromWeb: true, event: { xPath: "[\"ii\"]", hoverDuration: 5457, hoverToClick: false, gridPosition: { x: 3, y: 2 } }
Layout (Type 10) messages
Layout messages show the current display layout of a native page. Layout messages are Type 10 JSON messages.
Layout (Type 10) message schema
This is the schema for Layout (Type 10) messages.
"$ref" : "MessageHeader", "version": { "description": "Message Version, must be in x.x format", "type": "string", "required": true }, "layoutControl": { "description": "Control on application page", "type": "object", "properties": { "position": { "description": "Position of control", "type": "object", "properties": { "x": { "title": "X of the control", "type": "integer", "required": true }, "y": { "title": "Y of the control", "type": "integer", "required": true }, "height": { "title": "height of control", "type": "integer", "required": true }, "width": { "title": "width of control", "type": "integer", "required": true } }, "additionalProperties" : false } "id": { "title": "Id/Name/Tag of control", "type": "string", "required": true }, "type": { "title": "Type of control", "type": "string", "required": true }, "subType": { "title": "SubType of control", "type": "string", "required": true }, "tlType": { "title": "tlType of control that normalizes the control type for eventing", "type": "string", "required": true }, "currState": { "title": "Current state of control", "type": "object", "required": true, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } } }, "style" : { "title": "Style of the control", "type": "object", "required": true, "properties": { "textColor": { "title": "Text color", "type": "string", "required": true }, "textAlphaColor": { "title": "Text alpha color", "type": "string", "required": true }, "textBGColor": { "title": "Text background color", "type": "string", "required": true }, "textBGAlphaColor": { "title": "Text background alpha color", "type": "string", "required": true }, "bgColor": { "title": "Background color", "type": "string", "required": true }, "bgAlphaColor": { "title": "Background alpha color", "type": "string", "required": true } } } }, "additionalProperties" : false }
Layout (Type 10) message example
This is an example of a Layout (Type 10 ) message.
{ "offset": 27004, "screenviewOffset": 4706, "count": 16, "fromWeb": false, "type": 10, "version" : "1.0", "orientation" : 0, "deviceHeight": 592, "deviceWidth": 360, "layout": { "name": "loginPage", "class": "loginPageActivty", "controls": [ { "position": { "y": 38, "height": 96, "width": 720, "x": 0 }, "id": "com.tl.uiwidget:id\/userNameLabel", "idType": -1, "type": "UILabel", "subType": "UIView", "tlType": "label", "currState": { "text": "User name*" }, "style": { "textColor": 16777215, "textAlphaColor": 1, "textBGColor": 0, "textBGAlphaColor": 0, "bgColor": 0, "bgAlphaColor": 0 } }, {...}, {...} ] } }
Gesture (Type 11) messages
Gesture messages are used to log user action and behavior. A Gesture message consists of a control identifier and a the value returned by that control. The control identifiers are mapped to specific controls on the client logging platform. The value can be a number, a text string or structured data. Gesture messages are Type 11 JSON messages.
Gesture (Type 11) message schema
This is the schema for Gesture (Type 11) messages.
Touch events
This is a JSON object that represents a gesture finger that is linked to control underneath the finger. It is reused in targets property of gesture type 11.This is the schema for touch events:
{ "$ref" : "MessageHeader", "focusInOffset": { "title": "Milliseconds offset from offset for when focusIn of text fields occur", "type": "integer", "required": false }, "target": { "description": "Control being logged", "type": "object", "properties": { "position": { "description": "Position of control being logged", "type": "object", "properties": { "x": { "title": "X of the control", "type": "integer", "required": true }, "y": { "title": "Y of the control", "type": "integer", "required": true }, "height": { "title": "height of control", "type": "integer", "required": true }, "width": { "title": "width of control", "type": "integer", "required": true }, "relXY": { "title": "relative X & Y ratio that can be from 0 to 1 with a default value of 0.5", "type": "string", "required": true for click events }, "scrollX": { "title": "scroll X of the page", "type": "integer", "required": true }, "scrollY": { "title": "scroll Y of the page", "type": "integer", "required": true }, }, "additionalProperties" : false } "id": { "title": "Id/Name/Tag of control", "type": "string", "required": true }, "idType":{ "title": "Indicates what id is based on: Native id (e.g. HTML 'id' attribute): -1, xPath: -2, or Custom attribute for UIC and Hashcode value for Native: -3, or xPath for Native iOS/Android: -4", "type": "integer", "required": true }, "dwell": { "title": "Dwell time of control", "type": "integer value that is in milliseconds", "required": false }, "focusInOffset": { "title": "Offset when control got focus", "type": "integer value that is in milliseconds", "required": true in UIC }, "visitedCount": { "title": "Number of times a form control has been visited to be filled by user.", "type": "integer", "required": false }, "isParentLink": { "title": "To indicate if control a A type tag", "type": "boolean", "required": false only in UIC for usability }, "name": { "title": "Name of control", "type": "string", "required": true in UIC }, "type": { "title": "Type of control", "type": "string", "required": true }, "subType": { "title": "SubType of control", "type": "string", "required": true }, "tlType": { "title": "tlType of control that normalizes the control type for eventing", "type": "string", "required": true }, "prevState": { "title": "Previous state of control", "type": "object", "required": false, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } } }, "currState": { "title": "Current state of control", "type": "object", "required": true, "properties": { "?": { // Could be any variable name given by developer "title": "Additional data in string format", "type": "string", "required": false } } } }, "additionalProperties" : false } "event": { "description": "Event from control", "type": "object", "properties": { "tlEvent": { "title": "Tealeaf type of event", "type": "string", "required": true }, "type": { "title": "Type of event", "type": "string", "required": false }, "subType": { "title": "Subtype of event", "type": "string", "required": false } }, "additionalProperties" : false }}
Tap event schema
This contains only one touch object. This is the schema for tap events:
{ "$ref" : "MessageHeader", "event": { "description": "Event from control", "type": "object", "properties": { "tlEvent": { "title": "Tealeaf type of event", "type": "string", "required": true }, "type": { "title": "Type of event framework reports", "type": "string", "required": false } } }, "touches": { "description": "Gestures touch objects per finger.", "type": "array", "required": true "items": { "description": "Touch objects per finger starting with intial and ends with last object when finger is lifted from device.", "type": "array", "required": true, "$ref": "Touch" } } } }
Swipe event schema
The swipe event contains only one touch object which will be the initial location with its corresponding direction and velocity. This is the schema for swipe events:
{ "$ref" : "MessageHeader", "event": { "description": "Event from control", "type": "object", "properties": { "tlEvent": { "title": "Tealeaf type of event", "type": "string", "required": true }, "type": { "title": "Type of event framework reports", "type": "string", "required": false } } }, "touches": { "description": "Gestures touch objects per finger.", "type": "array", "required": true "items": { "description": "Touch objects per finger starting with intial and ends with last object when finger is lifted from device.", "type": "array", "required": true, "$ref": "Touch" } } }, "direction": { "title": "The direction of the swipe which can be up, down. left or right.", "type": "string", "required": true }, "velocityX": { "title": "The velocity of this measured in pixels per second along the x axis", "type": "float", "required": true }, "velocityY": { "title": "The velocity of this measured in pixels per second along the y axis", "type": "float", "required": false } }
Pinch events
The pinch event contains only an initial touch object per finger and the last touch object per finger, with the corresponding direction. This is the schema for pinch events:
{ "$ref" : "MessageHeader", "event": { "description": "Event from control", "type": "object", "properties": { "tlEvent": { "title": "Tealeaf type of event", "type": "string", "required": true }, "type": { "title": "Type of event framework reports", "type": "string", "required": false } } }, "touches": { "description": "Gestures touch objects per finger.", "type": "array", "required": true "items": { "description": "Touch objects per finger starting with intial and ends with last object when finger is lifted from device.", "type": "array", "required": true, "$ref": "Touch" } } }, "direction": { "title": "Direction of pinch which can be open or close", "type": "string", "required": true } }
Gesture (Type 11) message example
These are examples of UIC SDK Gesture (Type 11) messages.
Tap events
This example is a gesture message for a tap event:
{ "fromWeb": false, "type": 11, "offset": 46788, "screenviewOffset": 42208, "count": 14, "event": { "type": "ACTION_DOWN", "tlEvent": "tap" }, "touches": [ [ { "position": { "x": 179, "y": 543 }, "control": { "position": { "height": 184, "width": 1080, "relXY": "0.17,0.93" "scrollX": 10 "scrollY": 15 }, "id": "[RL,0]", "idType": -4, "type": "RelativeLayout", "subType": "ViewGroup", "tlType": "canvas" } } ] ] }
Double tap events
This example is a gesture message for a double tap event:
{ "fromWeb": false, "type": 11, "offset": 49585, "screenviewOffset": 45005, "count": 15, "event": { "type": "ACTION_DOWN", "tlEvent": "doubleTap" }, "touches": [ [ { "position": { "x": 182, "y": 520 }, "control": { "position": { "height": 184, "width": 1080, "relXY": "0.17,0.8" "scrollX": 10 "scrollY": 15 }, "id": "[RL,0]", "idType": -4, "type": "RelativeLayout", "subType": "ViewGroup", "tlType": "canvas" } } ] ] }
Tap hold events
This example is a gesture message for a tap hold event:
{ "fromWeb": false, "type": 11, "offset": 52389, "screenviewOffset": 47809, "count": 16, "event": { "type": "ACTION_DOWN", "tlEvent": "tapHold" }, "touches": [ [ { "position": { "x": 182, "y": 536 }, "control": { "position": { "height": 184, "width": 1080, "relXY": "0.17,0.89" "scrollX": 10 "scrollY": 15 }, "id": "[RL,0]", "idType": -4, "type": "RelativeLayout", "subType": "ViewGroup", "tlType": "canvas" } } ] ] }
Swipe event example
The swipe event contains only one touch object which will be the initial location with its corresponding direction and velocity. This example is a message for a swipe event:
{ "fromWeb": false, "type": 11, "offset": 54409, "screenviewOffset": 49829, "count": 17, "event": { "type": "ACTION_DOWN", "tlEvent": "swipe" }, "direction": "right", "velocityX": 7762.8466796875, "velocityY": 127.47991943359375, "touches": [ [ { "position": { "x": 75, "y": 538 }, "control": { "position": { "height": 184, "width": 1080, "relXY": "0.07,0.9" "scrollX": 10 "scrollY": 15 }, "id": "[RL,0]", "type": "RelativeLayout", "subType": "ViewGroup", "tlType": "canvas" } }, { "position": { "x": 212, "y": 526 }, "control": { "position": { "height": 184, "width": 1080, "relXY": "0.2,0.84" "scrollX": 10 "scrollY": 15 }, "id": "[RL,0]", "idType": -4, "type": "RelativeLayout", "subType": "ViewGroup", "tlType": "canvas" } } ] ] }
Pinch events
The pinch event contains only an initial touch object per finger and the last touch object per finger, with the corresponding direction. This example is a message for a pinch event:
{ "type": 11, "offset": 2220, "screenviewOffset": 2022, "count": 6, "fromWeb": false, "event": { "tlEvent": "pinch", "type": "onScale" }, "touches": [ [ { "position": { "y": 388, "x": 0 }, "control": { "position": { "height": 100, "width": 100, "relXY": "0.6,0.8" "scrollX": 10 "scrollY": 15 }, "id": "com.tl.uic.appDarkHolo:id/imageView1", "idType": -1, "type": "ImageView", "subType": "View", "tlType": "image" } }, { "position": { "y": 388, "x": 400 }, "control": { "position": { "height": 100, "width": 100, "relXY": "0.4,0.7" "scrollX": 10 "scrollY": 15 }, "id": "com.tl.uic.appDarkHolo:id/imageView1", "idType": -1, "type": "ImageView", "subType": "View", "tlType": "image" } } ], [ { "position": { "y": 388, "x": 800 }, "control": { "position": { "height": 100, "width": 100, "relXY": "0.6,0.8" "scrollX": 10 "scrollY": 15 }, "id": "com.tl.uic.appDarkHolo:id/imageView1", "idType": -1, "type": "ImageView", "subType": "View", "tlType": "image" } }, { "position": { "y": 388, "x": 500 }, "control": { "position": { "height": 100, "width": 100, "relXY": "0.4,0.7" "scrollX": 10 "scrollY": 15 }, "id": "com.tl.uic.appDarkHolo:id/imageView1", "idType": -1, "type": "ImageView", "subType": "View", "tlType": "image" } } ] ], "direction": "close" }
DOM Capture (Type 12) messages
DOM Capture messages are objects that contain serialized HTML data (DOM snapshot) of the page. DOM Capture Messages are Type 12 JSON messages.
DOM Capture (Type 12) message schema
This is the schema for the DOM Capture (Type 12) messages.
"$ref" : "MessageHeader", "domCapture": { "description": "Serialized HTML snapshot of the document.", "type": "object", "properties": { "dcid": { "title": "Unique identifier of this DOM snapshot.", "type": "string", "required": true } "fullDOM": { "title": "Flag indicating if the contents of this message contain a full DOM or a DOM diff.", "type": "boolean", "required": false }, "charset": { "title": "Browser reported charset of the document.", "type": "string", "required": false }, "root": { "title": "Serialized HTML of the document.", "type": "string", "required": false }, "diffs": { "title": "List of DOM diff entries. Each entry can contain a HTML Diff or an attribute diff.", "type": "array", "required": false, "Item": { "title": "An object containing the DOM diff. The diff can be a HTML diff or an attribute diff.", "type": "object", "required": false, "properties": { "xpath": { "title": "The xpath of the node.", "type": "string", "required": true }, "root": { "title": "Serialized HTML of the node referred by the xpath. Presence of this property constitutes a HTML diff.", "type": "string", "required": false }, "attributes": { "title": "List of attribute diff entries. Each entry contains a single attribute diff corresponding to the node referred by the xpath. Presence of this property constitutes an attribute diff.", "type": "array", "required": false, "Item": { "title": "An object containing the attribute diff.", "type": "object", "required": true, "properties": { "name": { "title": "The attribute name.", "type": "string", "required": true }, "value": { "title": "The attribute value.", "type": "string", "required": true } } } } } } }, "eventOn": { "title": "Flag indicating if Tealeaf eventing should be enabled for this DOM Capture snapshot.", "type": "boolean", "required": false }, "url": { "title": "URL path of the snapshot document", "type": "string", "required": false }, "host": { "title": "URL Host of the snapshot document", "type": "string", "required": false }, "error": { "title": "Error message", "type": "string", "required": false }, "errorCode": { "title": "Error code corresponding to the error message.", "type": "integer", "required": false }, "frames": { "title": "Serialized HTML of any child frames of the document", "type": "array", "required": false, "Item": { "title": "An object containing serialized HTML of the frame", "type": "object", "required": false, "properties": { "tltid": { "title": "Unique identifier for this frame. Same tltid is added to the serialized HTML source of the parent." "type": "string", "required": true }, "charset": { "title": "Browser reported charset of the document.", "type": "string", "required": true }, "url": { "title": "URL path of the snapshot document", "type": "string", "required": true }, "host": { "title": "URL Host of the snapshot document", "type": "string", "required": true }, "root": { "title": "Serialized HTML of the document.", "type": "string", "required": true } } } }, "canvas" : { "title": "Serialized data of the canvas snapshot.", "type": "array", "required": false, } }, "additionalProperties" : false }
DOM Capture (Type 12) message example
This is an example of a DOM Capture (Type 12) message.
This example shows a DOM message with full DOM capture enabled:
{ // DOM Capture messages use type 12 "type": 12, // The standard UIC message properties "offset": 16821, "screenviewOffset": 16817, "count": 5, "fromWeb": true, "domCapture": { "dcid": "dcid-3" "fullDOM":true "charset": "ISO-8859-1", "root": "<html><body><iframe id="greeting.html" tltid="tlt-4"/></body></html>", "host": "http://www.uictest.com", "url": "/h4/dcTest.html", "eventOn": true, "frames": [ { "tltid": "tlt-4", "root": "<html><body>Hello, World!</body></html>", "charset": "ISO-8859-1", "host": "http://www.uictest.com", "url": "/h4/greeting.html" } ], "canvas": [] } }
This example shows a DOM capture message with DOM diff enabled:
{ "type": 12, "offset": 13874, "screenviewOffset": 13861, "count": 6, "fromWeb": true, "domCapture": { "fullDOM": false, "diffs": [ { "xpath": "[[\"html\",0],[\"body\",0],[\"div\",1]]", "root": "<div class=\"bluebg\"><div><div>Input 1<input type=\"text\" name=\"ip-x-1\" value=\"\"></div></div></div>" } ], "dcid": "dcid-3.1437256358764", "eventOn": false } } DOM Diff (with HTML and attribute diff): { "type": 12, "offset": 5794, "screenviewOffset": 5777, "count": 8, "fromWeb": true, "domCapture": { "fullDOM": false, "diffs": [ { "xpath": "[[\"html\",0],[\"body\",0],[\"div\",2],[\"div\",1]]", "root": "<div>Select List:<select name=\"select.pvt\"><option value=\"O1\" selected=\"selected\">1</option><option value=\"O2\">2</option><option value=\"O3\">3</option></select></div>" }, { "xpath": "[[\"cb1\"]]", "attributes": [ { "name": "style", "value": "height: 13px; width: 13px; visibility: hidden;" } ] }, { "xpath": "[[\"container_1\"],[\"table\",0],[\"tbody\",0],[\"tr\",2],[\"td\",1],[\"select\",0]]", "attributes": [ { "name": "style", "value": "visibility: hidden;" } ] } ], "dcid": "dcid-3.1437256879815", "eventOn": false } }
This example shows the error message when the captured DOM message length exceeds the configured threshold:
{ // DOM Capture messages use type 12 "type": 12, // The standard UIC message properties "offset": 16821, "screenviewOffset": 16817, "count": 5, "fromWeb": true, // The DOM Capture data is namespaced in the domCapture object "domCapture": { // The "error" contains the verbose error message explaining why the DOM Capture couldn't be performed. "error": "Captured length (18045) exceeded limit (10000).", // The "errorCode" contains the numeric code for this error message. Currently, there is only 1 error message. "errorCode": 101, // The "dcid" property contains the unique string identifying this DOM Capture within the page instance. "dcid": "dcid-1.1414088027401" } }
GeoLocation (Type 13) messages
A GeoLocation message logs a user's location information. The message consists of a control identifier and a GeoLocation value. If the user has given the permission to use location data, GeoLocation returns latitude, longitude, accuracy values. If the user has not given permission to use location data, GeoLocation returns an error code and error string.
GeoLocation (Type 13) message schemas
This is the schema for the GeoLocation (Type 13) JSON messages:
"$ref" : "MessageHeader", "geolocation": { "lat": double, "long": double, "accuracy": float }
"$ref" : "MessageHeader", "geolocation": { "errorCode": int, "error": "string", }
GeoLocation (Type 13) message examples
This is an example of the GeoLocation (Type 13) JSON message.
{ "type": 13, "geolocation": { "lat": 37.5680, "long": -122.3292, "accuracy": 65 } }
{ "type": 13, "geolocation": { "errorCode": 201, "error": "permission denied", } }
Cookie (Type 14) message schema
This is the schema that is used to capture cookie information from an application as name-value pairs.
"$ref" : "MessageHeader", cookies: { cookieName: cookieValue}
The following example records the cookie values after each screenview load.
{ "type" : 14, "offset" : 5796, "screenviewOffset" : 10, "count" : 4, "fromWeb" : true, "cookies" :{ "cookieName1" : "valueA", "cookieName2": "valueB" } }
Examples
This example shows a session that contains two messages, a Screenview (Type 2) and a Custom Event (Type 5).
{ "serialNumber": 0, "messageVersion": "0.0.0.1", "sessions": [ { "startTime": 1328311295574, "id": "945202AC4E93104E05EDADE1F6059B97", "messages": [ { "offset": 124, "screenViewOffset": 4556, "type": 2, "logicalPageName": "HomeActivity" }, { "offset": 667, "screenViewOffset": 66778, "type": 1, "mobileState": { "orientation": 0, "freeStorage": 33972224, "androidState": { "keyboardState": 0 }, "battery": 50, "freeMemory": 64630784, "connectionType": "UMTS", "carrier": "Android", "networkReachability": "ReachableViaWWAN", "ip": "0.0.0.0" } }, { "customEvent": { "name": "Screenshot Taken for file: HomeActivity_1328311296341.jpg" }, "offset": 855, "screenViewOffset": 4556, "type": 5 } ] } ], "clientEnvironment": { "mobileEnvironment": { "android": { "keyboardType": "QWERTY", "brand": "generic", "fingerPrint": "generic/sdk/generic/ :2.2/FRF91/43546:eng/test-keys" }, "totalMemory": 63422464, "totalStorage": 12288, "orientationType": "PORTRAIT", "appVersion": "1.0.5", "manufacturer": "unknown", "userId": "android-build", "locale": "English (United States)", "deviceModel": "sdk", "language": "English" }, "width": 0, "height": 0, "osVersion": "2.2" } }