vn.teko.android.tracker:tracker-manager:1.0.0
#
New features- Update TrackingHelperV2Interface: remove some methods
- Any Activity and Fragment can be enabled to be tracked ScreenViewEvent by implement TrackableScreen
- Support deeplink with ads parameters such as: utm_term, utm_campaign, utm_content, utm_source
- Apply validation rule when initialize TrackingHelperV2
- Standardize event properties by using enum
#
Changes#
TrackingHelperV2Interface- Remove method
startNavigation()
Switch to auto-tracking mechanism by implementing TrackableScreen interface. Easy and time-less
- There is only one method for tracking ScreenViewEvent
If you don't want to use auto-tracking mechanism, you can use this method to manually track your screen.
- Add method
trackFinishLoading()
When your screen is ready to use, user can see its content and action on it. Please call this method to measure the loading time.
#
TrackableScreenActivity and Fragment can be auto-tracked ScreenViewEvent by implement Trackable Screen.
shouldTrack(): Boolean
We can have many fragments that base on this interface but it is only tracked if this function return [true]
With normal screen, you should override it and return [true].
With screen with tabs, you can expect that we only track on each fragment and do not track on parent fragment, so return [false]
screenName(): ScreenViewEventBody.ScreenName
The name of this screen. It should be listed as enum class that is inherited from [ScreenViewEventBody.ScreenName]
contentType: ScreenViewEventBody.ContentType
Which content this screen displays. It should be listed as enum class that is inherited from [ScreenViewEventBody.ContentType]
referrerScreen(): ScreenViewEventBody.ScreenName
(optional
)
Which screen starts this fragment. Leave it null to automatically track previous screen.
Custom it if you have another scenarios like push notification or something else.
sdkId(): String?
(optional
)
If your SDK integrates Tracking Library and you want to view what happened inside your SDK. Give it an id in right format (UUID)
return your SDK id. Or null if you are tracking on your app module
sdkVersion(): String?
(optional
)
If your SDK integrates Tracking Library and you want to view what happened inside your SDK and what SDK version was in use.
return your SDK version is integrated. Or null if you are tracking on your app module
#
Deeplink SupportedIf your activity/fragment was start by deeplink with ads parameters (utm_term, utm_campaign, utm_content, utm_source), they will automatically recorded by ScreenViewEvent
TrackingHelperV2Interface
has a method onNewIntent(activity, intent)
is only required if your activity is start with launchMode = singleTask/singleTop
#
TrackerConfig validationappId
now have to be follow by pattern \w{8}-\w{4}-\w{4}-\w{4}-\w{12}
#
Standardize event properties- AlertEvent
alertType
now accept two types Popup, Toast defined by AlertEventBody.AlertType
- CartEvent
eventName
now accept some enums listed by CartEventIdentifier.CartEventName
.
- ScreenViewEvent
eventName
now accept some two types listed by ScreenViewEventIdentifier.ScreenViewEventName
Two built-in screen were created for common usecases (Notificaton
, ExternalSource
)