Tracking the data of a visitor using the web view of your app is also relevant for the overall analysis. Therefore, to support web view tracking in apps, the user ever ID must be sent to the Mapp Intelligence Pixel for web pages (for example, Smart Tracking Pixel) to track the current user visit. Please ensure that the corresponding functionality is also activated in the pixel ("SendViaSDK" in Smart Pixel and "Web to App" Tracking in Pixel v5).

When using WebView tracking as described in this documentation, the user stays in the app context during the entire visit. The pixel sends the tracked data back to the SDK where the SDK uses the known user and system information. There is no session break or change in path navigation.

There are two ways to achieve this. We recommend the first approach:

  1. First, activate JavaScript in the WebView if you use this function.

    webView.settings.javaScriptEnabled = true
    JAVA



  2. Using the WebtrekkWebInterface, you transfer this object to the WebView JavaScript interface:

    webView.addJavascriptInterface(WebtrekkWebInterface(Webtrekk.getInstance()), WebtrekkWebInterface.TAG)
    JAVA


    You can alternatively append wt_eid to the URL with user ever ID:

    webView.loadUrl("https://your_website_url.com/?wt_eid=the ever id"
    JAVA

    Please refer to the following Android documentation for detailed information: Building web apps in WebView