Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webview tracking support for flutter_inappwebview plugin #624

Closed
orevial opened this issue Jun 17, 2024 · 10 comments
Closed

Add webview tracking support for flutter_inappwebview plugin #624

orevial opened this issue Jun 17, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@orevial
Copy link
Contributor

orevial commented Jun 17, 2024

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 orevial added the enhancement New feature or request label Jun 17, 2024
@fuzzybinary
Copy link
Member

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
Copy link
Contributor Author

orevial commented Jul 4, 2024

Sure, will do !

@orevial
Copy link
Contributor Author

orevial commented Jul 4, 2024

Done, it's request #1761119

@adamk22
Copy link

adamk22 commented Sep 20, 2024

Also looking forward to this feature.

fuzzybinary added a commit that referenced this issue Nov 13, 2024
This adds a package to support for InAppWebView.  This commits is focused only on the InAppWebView widget, and iOS support.

The next set of commits will focus on Android support and other browser classes in the package.

refs: RUM-6952, #624
fuzzybinary added a commit that referenced this issue Nov 13, 2024
This adds a package to support for InAppWebView.  This commits is focused only on the InAppWebView widget, and iOS support.

The next set of commits will focus on Android support and other browser classes in the package.

refs: RUM-6952, #624
fuzzybinary added a commit that referenced this issue Nov 19, 2024
This adds a package to support for InAppWebView.  This commits is focused only on the InAppWebView widget, and iOS support.

The next set of commits will focus on Android support and other browser classes in the package.

refs: RUM-6952, #624
fuzzybinary added a commit that referenced this issue Nov 20, 2024
This adds a package to support for InAppWebView.  This commits is focused only on the InAppWebView widget, and iOS support.

The next set of commits will focus on Android support and other browser classes in the package.

refs: RUM-6952, #624
@fuzzybinary
Copy link
Member

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

@orevial
Copy link
Contributor Author

orevial commented Nov 24, 2024

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

@fuzzybinary
Copy link
Member

@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 added a commit that referenced this issue Dec 5, 2024
This adds a package to support for InAppWebView.  This commits is focused only on the InAppWebView widget, and iOS support.

The next set of commits will focus on Android support and other browser classes in the package.

refs: RUM-6952, #624
@fuzzybinary
Copy link
Member

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.

@orevial
Copy link
Contributor Author

orevial commented Dec 13, 2024

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

@fuzzybinary
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants