You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: android/src/main/kotlin/com/snowplowanalytics/snowplow_tracker/readers/configurations/TrackerConfigurationReader.kt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ class TrackerConfigurationReader(values: Map<String, Any>) {
28
28
val userAnonymisation:Boolean? by valuesDefault
29
29
val screenContext:Boolean? by valuesDefault
30
30
val applicationContext:Boolean? by valuesDefault
31
+
val lifecycleAutotracking:Boolean? by valuesDefault
Copy file name to clipboardExpand all lines: doc/02-configuration.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,23 +34,26 @@ Setting a custom POST path can be useful in avoiding adblockers; it replaces the
34
34
35
35
`TrackerConfiguration` provides options to configure properties and features of the tracker. In addition to setting the app identifier and device platform, the configuration enables turning several automatic context entities on and off.
36
36
37
-
| Attribute | Type | Description | Android | iOS | Web | Default |
38
-
|---|---|---|---|---|---|---|
39
-
|`appId`|`String?`| Identifier of the app. | ✔ | ✔ | ✔ | null on Web, bundle identifier on iOS/Android |
40
-
|`devicePlatform`|`DevicePlatform?`| The device platform the tracker runs on. Available options are provided by the `DevicePlatform` enum. | ✔ | ✔ | ✔ | "web" on Web, "mob" on iOS/Android |
41
-
|`base64Encoding`|`bool?`| Indicates whether payload JSON data should be base64 encoded. | ✔ | ✔ | ✔ | true |
42
-
|`platformContext`|`bool?`| Indicates whether [platform](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/mobile_context/jsonschema/1-0-2) (mobile) context should be attached to tracked events. | ✔ | ✔ || true |
43
-
|`geoLocationContext`|`bool?`| Indicates whether [geo-location](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0) context should be attached to tracked events. | ✔ | ✔ | ✔ | false |
44
-
|`sessionContext`|`bool?`| Indicates whether [session](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2) context should be attached to tracked events. | ✔ | ✔ | ✔ | true |
45
-
|`webPageContext`|`bool?`| Indicates whether context about current [web page](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0) should be attached to tracked events. ||| ✔ | true |
46
-
|`screenContext`|`bool?`| Indicates whether [screen](http://iglucentral.com/schemas/com.snowplowanalytics.mobile/screen/jsonschema/1-0-0) context should be attached to tracked events. | ✔ | ✔ || true |
47
-
|`applicationContext`|`bool?`| Indicates whether [application](http://iglucentral.com/schemas/com.snowplowanalytics.mobile/application/jsonschema/1-0-0) context should be attached to tracked events. | ✔ | ✔ || true |
48
-
|`webActivityTracking`| WebActivityTracking?` | Enables activity tracking using page views and pings on the Web. ||| ✔ | true |
49
-
|`userAnonymisation`|`bool?`| Anonymises certain user identifiers. | ✔ | ✔ | ✔ | false |
37
+
| Attribute | Type | Description | Android | iOS | Web | Default |
|`appId`|`String?`| Identifier of the app. | ✔ | ✔ | ✔ | null on Web, bundle identifier on iOS/Android |
40
+
|`devicePlatform`|`DevicePlatform?`| The device platform the tracker runs on. Available options are provided by the `DevicePlatform` enum. | ✔ | ✔ | ✔ | "web" on Web, "mob" on iOS/Android |
41
+
|`base64Encoding`|`bool?`| Indicates whether payload JSON data should be base64 encoded. | ✔ | ✔ | ✔ | true |
42
+
|`platformContext`|`bool?`| Indicates whether [platform](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/mobile_context/jsonschema/1-0-2) (mobile) entity should be attached to tracked events. | ✔ | ✔ || true |
43
+
|`geoLocationContext`|`bool?`| Indicates whether [geo-location](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0) entity should be attached to tracked events. | ✔ | ✔ | ✔ | false |
44
+
|`sessionContext`|`bool?`| Indicates whether [session](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2) entity should be attached to tracked events. | ✔ | ✔ | ✔ | true |
45
+
|`webPageContext`|`bool?`| Indicates whether context about current [web page](http://iglucentral.com/schemas/com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0) should be attached to tracked events. ||| ✔ | true |
46
+
|`screenContext`|`bool?`| Indicates whether [screen](http://iglucentral.com/schemas/com.snowplowanalytics.mobile/screen/jsonschema/1-0-0) entity should be attached to tracked events. | ✔ | ✔ || true |
47
+
|`applicationContext`|`bool?`| Indicates whether [application](http://iglucentral.com/schemas/com.snowplowanalytics.mobile/application/jsonschema/1-0-0) entity should be attached to tracked events. | ✔ | ✔ || true |
48
+
|`webActivityTracking`|`WebActivityTracking?`| Enables activity tracking using page views and pings on the Web. ||| ✔ | true |
49
+
|`userAnonymisation`|`bool?`| Anonymises certain user identifiers. | ✔ | ✔ | ✔ | false |
50
+
|`lifecycleAutotracking`|`bool?`| Indicates whether the [lifecycle](iglu:com.snowplowanalytics.mobile/application_lifecycle/jsonschema/1-0-0) entity and foreground and background events should be autotracked. | ✔ | ✔ || false |
50
51
51
52
The optional `WebActivityTracking` property configures page tracking on Web. Initializing the configuration will inform `SnowplowObserver` observers (see section on auto-tracking in "Tracking events") to auto track `PageViewEvent` events instead of `ScreenView` events on navigation changes. Further, setting the `minimumVisitLength` and `heartbeatDelay` properties of the `WebActivityTracking` instance will enable activity tracking using 'page ping' events on Web.
52
53
53
-
Activity tracking monitors whether a user continues to engage with a page over time, and record how he / she digests content on the page over time. That is accomplished using 'page ping' events. If activity tracking is enabled, the web page is monitored to see if a user is engaging with it. (E.g. is the tab in focus, does the mouse move over the page, does the user scroll etc.) If any of these things occur in a set period of time (`minimumVisitLength` seconds from page load and every `heartbeatDelay` seconds after that), a page ping event fires, and records the maximum scroll left / right and up / down in the last ping period. If there is no activity in the page (e.g. because the user is on a different tab in his / her browser), no page ping fires.
54
+
Activity tracking monitors whether a user continues to engage with a page over time, and record how they digest content on the page over time. That is accomplished using 'page ping' events. If activity tracking is enabled, the web page is monitored to see if a user is engaging with it. (E.g. is the tab in focus, does the mouse move over the page, does the user scroll etc.) If any of these things occur in a set period of time (`minimumVisitLength` seconds from page load and every `heartbeatDelay` seconds after that), a page ping event fires, and records the maximum scroll left / right and up / down in the last ping period. If there is no activity in the page (e.g. because the user is on a different tab in their browser), no page ping fires.
55
+
56
+
Lifecycle autotracking is only available on mobile apps (iOS and Android). When configured, a Lifecycle context entity is attached to all events. It records whether the app was visible or not when the event was tracked. In addition, a `Background` event will be tracked when the app is moved to background, and a `Foreground` event when the app moves back to foreground (becomes visible on the screen).
54
57
55
58
See the separate page for information about anonymous tracking.
0 commit comments