These features address specific use cases that require configuration beyond standard event tracking, such as embedded WebViews or privacy-compliant tracking modes.
1 WebView Tracking
Enable web-to-app tracking in the Pixel configuration to track user activity in embedded WebViews. The Flutter SDK automatically passes the everId (EID) to the WebView, so all interactions are linked to the same user and session.
1.1 Concept
WebViews display web content within a mobile app. From a technical perspective, the HTML content is not part of the app’s native code. Without additional setup, SDK-based identifiers (such as the everId) are unavailable in the web layer.
When properly configured, the Pixel detects the app context and forwards the tracking request to the SDK. This preserves the user identity and session.
The EID does not need to be passed manually or returned from the Pixel. The app already holds the user context.
1.2 Requirements
To enable tracking continuity, the Pixel in the WebView must be configured for web-to-app communication:
Smart Pixel: Enable the
sendViaSDKsetting in the pixel configuration.See: Tracking Configuration – Advanced Settings in the documentation.
Tag Integration (TI): Activate
Web-to-app trackingin the tag setup.See: Pixel v5 – Advanced Configuration in the documentation.
If these options are not enabled, the Pixel treats the WebView as a regular browser. The everId is stripped, and the session is tracked separately.
1.3 Implementation
WebView is displayed as a pop-up overlay using coordinates. Further customization is not supported.
Import:
import 'package:plugin_mappintelligence/plugin_mappintelligence.dart';Usage:
PluginMappintelligence.trackWebview(
0.0,
Scaffold.of(context).appBarMaxHeight ??
MediaQuery.of(context).padding.top + kToolbarHeight,
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height -
(Scaffold.of(context).appBarMaxHeight ??
MediaQuery.of(context).padding.top + kToolbarHeight),
'http://demoshop.webtrekk.com/web2app/index.html');WebView is embedded via the Flutter plugin. Full integration is supported.
Import:
import 'package:plugin_mappintelligence/webview_flutter.dart';Usage:
return Scaffold(
appBar: AppBar(
title: Text('WebviewForAndroid'),
),
body: WebView(
initialUrl: 'http://demoshop.webtrekk.com/web2app/index.html',
javascriptMode: JavascriptMode.unrestricted,
),
);2 Anonymous Tracking
Anonymous tracking disables the generation and use of the everId. It is typically used in opt-out scenarios or before user consent is obtained.
This significantly reduces data quality. Use only if required by your data compliance team.
More information: What is Anonymized (aka Cookieless) Tracking?
2.1 Concept
In anonymous mode, all tracking requests are sent without a persistent user ID. You can optionally suppress specific parameters (e.g. customer ID) and configure whether a new everId is generated when switching back to user-based tracking.
2.2 Method
PluginMappintelligence.setAnonymousTracking(
bool anonymousTracking, // default: false
List<String> parametersToSuppress, // default: []
bool generateNewEverId // default: true
);2.3 Examples
Initialization with anonymous tracking
Future _initNative() async {
PluginMappintelligence.initialize(
['<account_id>'],
'<trackserver_url>'
);
PluginMappintelligence.setAnonymousTracking(true, ['cd'], true);
PluginMappintelligence.build();
}Runtime switching
// Enable anonymous mode and suppress "cd" and "uc709"
PluginMappintelligence.setAnonymousTracking(true, ['cd','uc709'], true);
// Re-enable tracking and generate a new everId
PluginMappintelligence.setAnonymousTracking(false, [], true);