Skip to content

Commit b489be0

Browse files
committed
Merge branch 'release/0.5.0'
2 parents 11965f8 + 531cb68 commit b489be0

File tree

17 files changed

+107
-80
lines changed

17 files changed

+107
-80
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.5.0
2+
3+
* Add lifecycle autotracking config option (#39)
4+
15
# 0.4.0
26

37
* Add configuration for setting custom HTTP headers for requests to the collector (#34)

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,19 @@ It is build on top of Snowplow's native [iOS](https://github.com/snowplow/snowpl
2020

2121
## Features
2222

23-
| Feature | Android | iOS | Web |
24-
|---|---|---|---|
25-
| Manual tracking of events: screen views, self-describing, structured, timing, consent granted and withdrawal ||||
26-
| Automatic tracking of views events from Navigator API ||||
27-
| Adding custom context entities to events ||||
28-
| Support for multiple trackers ||||
29-
| Configurable subject properties ||| partly |
30-
| Session context entity added to events ||||
31-
| Geo-location context entity ||||
32-
| Mobile platform context entity ||| |
33-
| Web page context entity | | ||
34-
| Configurable GDPR context entity ||||
23+
| Feature | Android | iOS | Web |
24+
|--------------------------------------------------------------------------------------------------------------|---|---|--------|
25+
| Manual tracking of events: screen views, self-describing, structured, timing, consent granted and withdrawal ||||
26+
| Automatic tracking of views events from Navigator API ||||
27+
| Adding custom context entities to events ||||
28+
| Support for multiple trackers ||||
29+
| Configurable subject properties ||| partly |
30+
| Session context entity added to events ||||
31+
| Geo-location context entity ||||
32+
| Mobile platform context entity ||| |
33+
| Web page context entity | | ||
34+
| Configurable GDPR context entity ||||
35+
| Lifecycle autotracking ||| |
3536

3637
## Quick Start
3738

@@ -47,7 +48,7 @@ This will add a line with the dependency like this to your `pubspec.yaml`:
4748

4849
```yml
4950
dependencies:
50-
snowplow_tracker: ^0.4.0
51+
snowplow_tracker: ^0.5.0
5152
```
5253
5354
Import the package into your Dart code:

android/src/main/kotlin/com/snowplowanalytics/snowplow_tracker/TrackerVersion.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
package com.snowplowanalytics.snowplow_tracker
1313

1414
object TrackerVersion {
15-
val TRACKER_VERSION = "flutter-0.4.0"
15+
val TRACKER_VERSION = "flutter-0.5.0"
1616
}

android/src/main/kotlin/com/snowplowanalytics/snowplow_tracker/readers/configurations/TrackerConfigurationReader.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class TrackerConfigurationReader(values: Map<String, Any>) {
2828
val userAnonymisation: Boolean? by valuesDefault
2929
val screenContext: Boolean? by valuesDefault
3030
val applicationContext: Boolean? by valuesDefault
31+
val lifecycleAutotracking: Boolean? by valuesDefault
3132

3233

3334
fun toConfiguration(context: Context): TrackerConfiguration {
@@ -52,6 +53,7 @@ class TrackerConfigurationReader(values: Map<String, Any>) {
5253
userAnonymisation?.let { trackerConfig.userAnonymisation(it) }
5354
screenContext?.let { trackerConfig.screenContext(it) }
5455
applicationContext?.let { trackerConfig.applicationContext(it) }
56+
lifecycleAutotracking?.let { trackerConfig.lifecycleAutotracking(it) }
5557

5658
return trackerConfig
5759
}

doc/01-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This will add a line with the dependency like to your pubspec.yaml:
1616

1717
```yml
1818
dependencies:
19-
snowplow_tracker: ^0.4.0
19+
snowplow_tracker: ^0.5.0
2020
```
2121
2222
Import the package into your Dart code:

doc/02-configuration.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,26 @@ Setting a custom POST path can be useful in avoiding adblockers; it replaces the
3434

3535
`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.
3636

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 |
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) 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 |
5051

5152
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.
5253

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).
5457

5558
See the separate page for information about anonymous tracking.
5659

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.4'
9+
classpath 'com.android.tools.build:gradle:7.1.3'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PODS:
55
- FMDB/standard (2.7.5)
66
- integration_test (0.0.1):
77
- Flutter
8-
- snowplow_tracker (0.4.0):
8+
- snowplow_tracker (0.5.0):
99
- Flutter
1010
- SnowplowTracker (~> 5.4)
1111
- SnowplowTracker (5.4.0):
@@ -33,9 +33,9 @@ SPEC CHECKSUMS:
3333
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
3434
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
3535
integration_test: 13825b8a9334a850581300559b8839134b124670
36-
snowplow_tracker: 022a7e65a05a6f6043043d58d8df870b379efe5d
36+
snowplow_tracker: 941f2de51ed3c6964ccab206ac5ba75f326a188a
3737
SnowplowTracker: a7fa5ae461955637f773a51c941635f39a5b0747
3838

3939
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
4040

41-
COCOAPODS: 1.12.0
41+
COCOAPODS: 1.12.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
97C146E61CF9000F007C117D /* Project object */ = {
156156
isa = PBXProject;
157157
attributes = {
158-
LastUpgradeCheck = 1300;
158+
LastUpgradeCheck = 1430;
159159
ORGANIZATIONNAME = "";
160160
TargetAttributes = {
161161
97C146ED1CF9000F007C117D = {

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)