The Pushwoosh Web SDK caches its configuration, including the applicationCode, in the browser's localStorage under the key PUSHWOOSH_SDK_STORE.
If you host multiple applications with different Application Codes on the same domain (e.g., app1.example.com and app2.example.com), the SDK on the second site may read the cached configuration from the first site if the storage is shared. This causes the SDK to initialize with the wrong Application Code.
Solution: To prevent this conflict, force the SDK to clear its cached state before initialization on pages where the Application Code might change:
// Clear the cached SDK state
localStorage.removeItem('PUSHWOOSH_SDK_STORE');
// Initialize with the correct Application Code
pushwoosh.push(['init', {
applicationCode: 'YOUR_CORRECT_APP_CODE',
// ... other parameters
}]);
Comments
0 comments
Please sign in to leave a comment.