Yes, the experiment buckets will be preserved for the Stable ID experiments when the user transitions from the Server Side Rendered (SSR) page to the Client Side Rendered (CSR) page or vice versa. This is because the Stable ID is a unique identifier that persists on the device and is used to ensure that your users have the same experience or group across different states, including logged out to logged in states.
Even though the user object (userId) changes between these pages, as long as the Stable ID remains the same, the user's experiment group will remain consistent. This is because the Stable ID is used for bucketing in the experiment, not the userId.
However, it's important to ensure that the Stable ID is correctly implemented and persisted across different pages and sessions. If you're facing issues with Stable ID changing across subdomains, one possible solution is to store the Stable ID 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.
Remember to always follow the best practices as outlined in the documentation when implementing experiments with Statsig.