Hybrid mobile app: Mobile SDK vs Web SDK | Community
Skip to main content
Michael_Soprano
Level 10
July 22, 2025
Solved

Hybrid mobile app: Mobile SDK vs Web SDK

  • July 22, 2025
  • 1 reply
  • 438 views

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?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by nitesh__anwani

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.

SDK Method Reference:

https://developer.adobe.com/client-sdks/home/base/mobile-core/identity/api-reference/#appendtourl--appendvisitorinfoforurl

 

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.

 

 

Implementation Insight and Issue Observed

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.

Resolution:

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:

https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/issue-with-the-adobe-visitor-id-between-native-app-and-webviews/m-p/679728

 

Thanks,

Nitesh

1 reply

nitesh__anwaniAccepted solution
Level 3
July 22, 2025

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.

SDK Method Reference:

https://developer.adobe.com/client-sdks/home/base/mobile-core/identity/api-reference/#appendtourl--appendvisitorinfoforurl

 

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.

 

 

Implementation Insight and Issue Observed

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.

Resolution:

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:

https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/issue-with-the-adobe-visitor-id-between-native-app-and-webviews/m-p/679728

 

Thanks,

Nitesh