dd-sdk-android icon indicating copy to clipboard operation
dd-sdk-android copied to clipboard

Android Web View Tracking

Open Maxwell6635 opened this issue 3 years ago • 1 comments

Thanks for taking the time for reporting an issue!

Describe what happened

  • Unable dynamic add web host in configuration, where we have a lot webview load url with different domain or host especially partner returning different url so we unable add the host in here.
 val configuration = Configuration.Builder(
                 rumEnabled = true
             )
            .useSite()
            .trackInteractions()
            **.setWebViewTrackingHosts(hosts)**
            .trackLongTasks(durationThreshold)
            .useViewTrackingStrategy(strategy)
            .build()
         val credentials = Credentials(<CLIENT_TOKEN>, <ENV_NAME>, <APP_VARIANT_NAME>, <APPLICATION_ID>)
         Datadog.initialize(this, credentials, configuration, trackingConsent)
     }
 }

Steps to reproduce the issue:

  1. setWebViewTrackingHosts(hosts)

Describe what you expected:

  • Can the SDK able to support configuration to support all host that called from webview ?

Additional context

  • Datadog SDK version: 1.13.0
  • Datadog Gradle Plugins version: 1.4.0
  • Versions of any other relevant dependencies (OkHttp, …): 4.9.0 OKhttp
  • Proguard configuration: Enable Full Mode for R8
  • Gradle Plugins: 7.2.0

Maxwell6635 avatar Jul 22 '22 02:07 Maxwell6635

Hi @Maxwell6635 , and thanks for opening this suggestion.

As of today, this is unfortunately not something that we can do. The goal of this check is that the data catpured inside the webview can only be shared if you own the website displayed, to prevent sharing PII or other information that do not belong to you. Also if a website owned by a third party (partner or otherwise) is using Datadog, we want to avoid capturing the data as those other companies would be blind on their own website.

xgouchet avatar Jul 22 '22 06:07 xgouchet