DataDog / dd-sdk-flutter

Flutter bindings and tools for utilizing Datadog Mobile SDKs
Apache License 2.0
45 stars 42 forks source link

Add webview tracking support for flutter_inappwebview plugin #624

Open orevial opened 5 months ago

orevial commented 5 months ago

Feature description

Web View tracking for Flutter is closely coupled to Flutter default webview plugin webview_flutter.

It would be great if there was the same kind of extension on the very popular plugin flutter_inappwebview as well.

This would offer this kind of integration for this plugin :

image

Proposed solution

Add an extension to flutter_inappwebview controller like we have today for flutter_webview, e.g.:

InAppWebView(
  initialSettings: InAppWebViewSettings(
    ... some settings
  )..trackDatadogEvents(
    DatadogSdk.instance,
    ['myapp.example'],
  )
)

Other relevant information

Proposed solution would be the most integrated solution.

fuzzybinary commented 5 months ago

Hi @orevial,

I will look into it. Can you also raise a feature request with Datadog support so we can capture this internally?

Thanks!

orevial commented 4 months ago

Sure, will do !

orevial commented 4 months ago

Done, it's request #1761119

adamk22 commented 2 months ago

Also looking forward to this feature.

fuzzybinary commented 1 day ago

@orevial and @adamk22 --

I've started looking into supporting this, but I've run into some issues that appear to be in the package itself that are preventing a full implementation.

Can you tell me what version of the package you're using, and which portions you're using (InAppWebView, InAppBrowser or ChromeSafariBrowser)?

Essentially, InAppBrowser in 6.0+ appears to be broken on Android 33+, at least in my testing.