My customer has hybrid mobile app: web view (in mobile app) + native app (kotlin etc)
I suppose that some web view needs to use web sdk and native app has to use mobile sdk?
Did anybody do something like that recently? How to share the ECID? What might be the risks?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Michael_Soprano ,
To synchronize the ECID (Experience Cloud ID) between native app screens and WebViews, the app development team needs to append the visitor information to the URL of the page load request.
This method appends the necessary visitor info to the URL so that WebViews can share the same ECID as the native app.
Note: This approach only works if both native app tracking and WebView tracking are configured to send data to the same Adobe Analytics report suite.
In a recent implementation involving WebViews within the app (the underlying tech stack may differ, but it doesn't impact the analytics behavior), I encountered an issue where one of the WebViews was loaded without the visitor info appended to the URL.
As a result:
The WebView generated a different ECID from the native app.
This led to inflated visit and visitor counts.
Even after fixing the URL to include the correct visitor info, the ECID in the WebView was not overwritten in subsequent sessions.
After further investigation, we discovered that the web page must have a specific flag enabled to allow the ECID to be overwritten.
Flag: overwriteCrossDomainMCIDAndAID = true
This flag ensures that the ECID received via the appended URL will replace the existing one in the WebView session, allowing proper continuity in user tracking.
Here’s the community post I created during my research on overwriting the ECID in WebViews:
Thanks,
Nitesh
Hi @Michael_Soprano ,
To synchronize the ECID (Experience Cloud ID) between native app screens and WebViews, the app development team needs to append the visitor information to the URL of the page load request.
This method appends the necessary visitor info to the URL so that WebViews can share the same ECID as the native app.
Note: This approach only works if both native app tracking and WebView tracking are configured to send data to the same Adobe Analytics report suite.
In a recent implementation involving WebViews within the app (the underlying tech stack may differ, but it doesn't impact the analytics behavior), I encountered an issue where one of the WebViews was loaded without the visitor info appended to the URL.
As a result:
The WebView generated a different ECID from the native app.
This led to inflated visit and visitor counts.
Even after fixing the URL to include the correct visitor info, the ECID in the WebView was not overwritten in subsequent sessions.
After further investigation, we discovered that the web page must have a specific flag enabled to allow the ECID to be overwritten.
Flag: overwriteCrossDomainMCIDAndAID = true
This flag ensures that the ECID received via the appended URL will replace the existing one in the WebView session, allowing proper continuity in user tracking.
Here’s the community post I created during my research on overwriting the ECID in WebViews:
Thanks,
Nitesh