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

Add webview tracking support for flutter_inappwebview plugin

Open orevial opened this issue 1 year ago • 4 comments

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.

orevial avatar Jun 17 '24 09:06 orevial

Hi @orevial,

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

Thanks!

fuzzybinary avatar Jun 24 '24 13:06 fuzzybinary

Sure, will do !

orevial avatar Jul 04 '24 09:07 orevial

Done, it's request #1761119

orevial avatar Jul 04 '24 09:07 orevial

Also looking forward to this feature.

adamk22 avatar Sep 20 '24 09:09 adamk22

@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.

fuzzybinary avatar Nov 21 '24 20:11 fuzzybinary

@fuzzybinary I'm using latest flutter_inappwebview at this point which is 6.1.5.

I'm mostly using InAppWebView and I would say that the priority for me is to have support for this widget. I'm currently testing ChromeSafariBrowser for a specific SSO usage but it's a very beta feature on my part and very isolated from the rest of my app so I do not really mind if this one is not supported (or not right now).

What do you mean when you say that InAppBrowser appears to be broken on Android 33+ ? My app is currently deployed on 15K+ Android 33+ devices, and I can assure you that it works well for us 🙂

orevial avatar Nov 24 '24 11:11 orevial

@orevial That's good to know, thanks.

I should be more specific. InAppBrowser works, but a key feature is broken that would allow us to support tracking in Datadog. Specifically this issue. It will be fixed in 6.2.0, but I'm trying to see if the fix can be backported to 6.1.x

fuzzybinary avatar Dec 03 '24 15:12 fuzzybinary

Hi folks!

datadog_inappwebview_tracking 1.0.1 is now live and available for testing.

Please note the giant warning about tracking InAppBrowser in Android 33+ will not work. I intend to release a 1.1 that relies on flutter_inappwebview 6.2 in the very near future which should resolve the issue.

Please let me know if you run into any problems.

fuzzybinary avatar Dec 12 '24 14:12 fuzzybinary

Thanks for the update @fuzzybinary. Not sure yet if I start testing the 1.0.1 now without Android 33+ working or if I just wait for the next release of flutter_inappwebview and yours afterwards. I guess it won't take too long now, I can wait a few more days...

orevial avatar Dec 13 '24 16:12 orevial

@orevial Sounds good. I'll likely be releasing 1.1.0-beta.1 later today, relying on flutter_inappwebview 6.2-beta.2. I have no idea what flutter_inappwebview's release schedule looks like though, so I can't say when 6.2 will come out of beta. Up to you if you want to take the dependency on the beta versions.

fuzzybinary avatar Dec 16 '24 14:12 fuzzybinary