-
Notifications
You must be signed in to change notification settings - Fork 61
WebViewTracking
Xavier F. Gouchet edited this page Sep 4, 2024
·
1 revision
object WebViewTracking
An entry point to Datadog WebView Tracking feature.
WebViewTracking._InternalWebViewProxy
fun enable(webView: WebView, allowedHosts: List<String>, @FloatRange(from = 0.0, to = 100.0)logsSampleRate: Float = 100.0f, sdkCore: SdkCore = Datadog.getInstance())
Attach the bridge to track events from the WebView as part of the same session. This method must be called from the Main Thread. Please note that:
- you need to enable the JavaScript support in the WebView settings for this feature to be functional:
webView.settings.javaScriptEnabled = true
- by default, navigation will happen outside of your application (in a browser or a different app). To prevent that and ensure Datadog can track the full WebView user journey, attach a android.webkit.WebViewClient to your WebView, as follow:
webView.webViewClient = WebViewClient()
The WebView events will not be tracked unless the web page's URL Host is part of the list of allowed hosts.
webView | the webView on which to attach the bridge. |
allowedHosts | a list of all the hosts that you want to track when loaded in the WebView (e.g.: listOf("example.com", "example.net") ). |
logsSampleRate | the sample rate for logs coming from the WebView, in percent. A value of 30 means we'll send 30% of the logs. If value is 0 , no logs will be sent to Datadog. Default is 100.0 (ie: all logs are sent). |
sdkCore | SDK instance on which to attach the bridge. More here. |
- Datadog
- DatadogSite
- _InternalProxy
- InternalLogger
- SdkCore
- DatadogContext
- DeviceInfo
- DeviceType
- NetworkInfo
- ProcessInfo
- TimeInfo
- UserInfo
- Feature
- FeatureContextUpdateReceiver
- FeatureEventReceiver
- FeatureScope
- FeatureSdkCore
- StorageBackedFeature
- Request
- RequestFactory
- DataWriter
- EventBatchWriter
- EventType
- FeatureStorageConfiguration
- RawBatchEvent
- DataStoreHandler
- DataStoreReadCallback
- DataStoreWriteCallback
- InternalSdkCore
- SdkReference
- BackPressureMitigation
- BackPressureStrategy
- BatchProcessingLevel
- BatchSize
- Configuration
- HostsSanitizer
- UploadFrequency
- UploadSchedulerStrategy
- DataConstraints
- DatadogDataConstraints
- ThreadDump
- DefaultFirstPartyHostHeaderTypeResolver
- FirstPartyHostHeaderTypeResolver
- Deserializer
- BuildSdkVersionProvider
- JsonSerializer
- MethodCallSamplingRate
- PerformanceMetric
- TelemetryMetricType
- PersistenceStrategy
- Serializer
- DataStoreContent
- RateBasedSampler
- Sampler
- FlushableExecutorService
- EventMapper
- MapperSerializer
- NoOpEventMapper
- LogAttributes
- TrackingConsent
- TrackingConsentProviderCallback
- Encryption
- TracingHeaderType
- DdRumContentProvider
- GlobalRumMonitor
- Rum
- RumActionType
- RumAttributes
- RumConfiguration
- RumErrorSource
- RumMonitor
- RumPerformanceMetric
- RumResourceAttributesProvider
- RumResourceKind
- RumResourceMethod
- RumSessionListener
- _RumInternalProxy
- VitalsUpdateFrequency
- ViewEventMapper
- ResourceTiming
- AdvancedNetworkRumMonitor
- ResourceId
- RumResourceInputStream
- AcceptAllActivities
- AcceptAllDefaultFragment
- AcceptAllNavDestinations
- AcceptAllSupportFragments
- ActivityLifecycleTrackingStrategy
- ActivityViewTrackingStrategy
- ComponentPredicate
- FragmentViewTrackingStrategy
- InteractionPredicate
- MixedViewTrackingStrategy
- NavigationViewTrackingStrategy
- TrackingStrategy
- ViewAttributesProvider
- ViewTrackingStrategy
- DatadogDatabaseErrorHandler
- ActionEvent
- ErrorEvent
- LongTaskEvent
- ResourceEvent
- ViewEvent
- TelemetryConfigurationEvent
- TelemetryDebugEvent
- TelemetryErrorEvent
- ExtensionSupport
- ImagePrivacy
- MapperTypeWrapper
- SessionReplay
- SessionReplayConfiguration
- SessionReplayPrivacy
- MappingContext
- OptionSelectorDetector
- SystemInformation
- BaseAsyncBackgroundWireframeMapper
- BaseViewGroupMapper
- BaseWireframeMapper
- EditTextMapper
- TextViewMapper
- TraverseAllChildrenMapper
- WireframeMapper
- AndroidMDrawableToColorMapper
- AndroidQDrawableToColorMapper
- AsyncJobStatusCallback
- ColorStringFormatter
- DefaultColorStringFormatter
- DefaultViewBoundsResolver
- DefaultViewIdentifierResolver
- DrawableToColorMapper
- GlobalBounds
- ImageWireframeHelper
- LegacyDrawableToColorMapper
- ViewBoundsResolver
- ViewIdentifierResolver
- MobileSegment
- ResourceHashesEntry
- ResourceMetadata