Add webview tracking support for flutter_inappwebview plugin
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 :
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.
Hi @orevial,
I will look into it. Can you also raise a feature request with Datadog support so we can capture this internally?
Thanks!
Sure, will do !
Done, it's request #1761119
Also looking forward to this feature.
@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 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 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
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.
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 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.