You should initialize the Pushwoosh Web SDK once when your page or application view loads.
Multi-Page Applications (MPA): If your website consists of traditional pages where each navigation causes a full page reload, you will need to include the Pushwoosh initialization script (e.g.,
Pushwoosh.push(['init', {...}]);
) on each page where you want push notification functionality to be active. This is often done by placing the script in a common header or footer that is part of every page.Single-Page Applications (SPA): If your application is a SPA (e.g., built with React, Angular, Vue.js) and navigation between different views or sections occurs without a full page reload, you only need to initialize the SDK once when the application initially loads. Subsequent navigation within the SPA does not require re-initialization of the Pushwoosh SDK, as it will remain active.
The key is that the Pushwoosh.push(['init', {...}])
call needs to execute for the SDK to become active and functional for the current page view or application state.
Comments
0 comments
Please sign in to leave a comment.