Methods

MethodDescription

trackPage(
page: PageViewEvent
)

Used for page tracking when object-oriented tracking is used. When using object-oriented tracking, you can create objects based on your use cases (e.g. page object containing all significant data of your page, product and order objects containing the data of your products and order, etc.) and the SDK converts it automatically into the Mapp Intelligence data model specification when sending the request to the server. We recommend object-oriented tracking for all customers who are not familiar with the Mapp Intelligence data model or implementing both, the iOS SDKv5 and Android SDKv5.

trackAction(
       action: ActionEvent
)

Used to track events when object-oriented tracking is used. This option is recommended if you are not familiar with the Mapp Intelligence data model and API.

trackPage(

context: Context,
customPageName: String? = null,
trackingParams: Map<String, String> = emptyMap()

)

Used for page tracking when you want to specify the context to be tracked as well. You can define a page name in "customPageName" and add page parameter in "trackingParams". This is used for query parameter tracking.

trackCustomPage(

pageName: String,
trackingParams: Map<String, String> = emptyMap()

)

Used for page tracking without specifying the context. You can define a page name in "customPageName" and add page parameter in "trackingParams". This is used for query parameter tracking.


trackCustomEvent(

eventName: String,
trackingParams: Map<String, String> = emptyMap()

)

Used to track events in Intelligence when query parameter tracking is used. This option requires good knowledge of the Mapp Intelligence data model. An event name must always be given, tracking parameters are optional.


customParam(

paramType : ParamType, value : Int

)

createCustomParam(

paramType : ParamType, value : Int

)

Creates a new custom parameter of the specified type. The possible types (parameter constants) are documented in the respective use cases of this chapter.

For specific code examples on method usage, please refer to the corresponding use cases in this chapter.


Object-Oriented versus Query Parameter Tracking

The Android SDKv5 offers both object-oriented and query parameter-based tracking (as of version 5.0.8). The main difference is that in object-oriented tracking you can create objects based on use cases (e.g. gather all information about products or users in separate objects) and send this information to the SDK. The SDK will then use the information and adjust it to the correct format for the Mapp Intelligence API. Object-oriented tracking is also easier when you implement iOS tracking at the same time because both libraries are aligned.

Query-based tracking lets you create all the parameters and query URL yourself. This option requires good knowledge of the Mapp Intelligence API and data model.

Further Information