You can customize the text elements of the Pushwoosh Custom Subscription Popup directly through the SDK's initialization configuration. This allows you to tailor the popup's messaging to your users without needing to build a completely custom HTML popup.
Locate SDK Initialization: Find the
Pushwoosh.init({...})
call in your website's JavaScript code.-
Configure
customPopup.options
: Within thePushwoosh.init
options, use thecustomPopup.options
object to specify the text for various parts of the popup. Key parameters include:-
titleText
: The main title of the popup. -
messageText
: The descriptive message or sub-text. -
subscribeButtonText
: Text for the button that initiates the subscription (e.g., "Allow", "Subscribe"). -
unsubscribeButtonText
: Text for the button to opt-out (shown if the user is already subscribed and the popup allows unsubscribing). -
cancelButtonText
: Text for the button to dismiss the popup (e.g., "Not Now", "Later").
Here's an example:
Pushwoosh.init({ logLevel: 'debug', // Optional: for development applicationCode: 'YOUR_PUSHWOOSH_APP_CODE', safariWebsitePushID: 'YOUR_SAFARI_WEBSITE_PUSH_ID', // If using Safari Push Notifications // ... other init options ... customPopup: { options: { manualToggle: true, // Set to true if you trigger manually, false for auto-show titleText: "Get Notified!", messageText: "Enable notifications to receive our latest updates and offers.", subscribeButtonText: "Yes, Notify Me", unsubscribeButtonText: "Disable Notifications", cancelButtonText: "No, Thanks" // You can also configure colors, position, etc. See documentation. } } });
-
Refer to Documentation: For a comprehensive list of all available
customPopup.options
, including styling (colors, fonts, position) and other behavioral settings, please consult the official Pushwoosh Web SDK documentation on the Custom Subscription Popup.
Comments
0 comments
Please sign in to leave a comment.