Yes, it is possible to preserve the Statsig Stable ID across different platforms such as mWeb and mobileApp. The Stable ID is generated for anonymous use cases and is persisted in local storage. For signed-in users, consistency is ensured across different surfaces, such as mobile app vs desktop, as long as there's a userID used across them.
If you're experiencing issues with StableID changing across subdomains or platforms, one possible solution is to store the StableID in a cookie and reuse it. You can store and retrieve your own id and use the overrideStableID
method on the SDK to send it to Statsig. Your overridden id will always take preference. This way, you can set the StableID for not logged in users and your in-house id for people that are logged in.
Here's an example of how you can override the StableID:
javascript await Statsig.initialize( "client-sdk-key", null, { overrideStableID: '<passed via cookie or via db lookup>' } );
This should ensure that both your marketing site and main app use the same StableID, allowing you to run experiments that span both sites.