Manual Tracking
    • 1 Minute to read
    • Dark
      Light

    Manual Tracking

    • Dark
      Light

    Article summary

    The Mapp Android SDK provides an efficient option for manual tracking, giving you control over how you track events and page views through Object-Oriented Tracking—the recommended approach for all current implementations, providing a simple and robust method for tracking events and page views.

    Object-Oriented Tracking

    With object-oriented tracking, you create objects (e.g., pages, products, users) that hold significant data, and the SDK automatically converts this data into the correct format for Mapp Intelligence.

    Methods Overview

    Method

    Description

    // Page tracking
    trackPage(
        page: PageViewEvent
    )

    Used for page tracking. You create page objects, and the SDK converts these into the Mapp Intelligence format.

    // Event tracking
    trackAction(
        action: ActionEvent
    )

    Tracks user events. Ideal for those not familiar with the Mapp Intelligence API.

    Deprecated: Query Parameter Tracking

    Important

    Query Parameter-Based Tracking has been deprecated and is no longer recommended for use. If you are still using this method, it is advisable to migrate to object-oriented tracking as soon as possible. This section is only for legacy support purposes.

    Methods Overview

    Method

    Description

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

    Tracks pages by specifying a context and custom page name, with optional tracking parameters.

    // Page tracking without context
    trackCustomPage(
        pageName: String, 
        trackingParams: Map<String, String> = emptyMap()
    )

    Tracks pages without specifying a context. Provides flexibility in naming pages and adding parameters.

    // Event tracking
    trackCustomEvent(
        eventName: String, 
        trackingParams: Map<String, String> = emptyMap()
    )

    Tracks events when using query parameter tracking. Requires a good understanding of the Mapp Intelligence data model and API.

    Kotlin:

    // Create custom parameters for tracking
    customParam(
        paramType: ParamType, 
        value: Int
    )

    Java:

    // Create custom parameters for tracking
    createCustomParam(
    
    paramType : ParamType, value : Int
    
    )

    Creates a new custom parameter of the specified type. Refer to specific use cases in this chapter for more detailed explanations of parameters.


    Was this article helpful?