Documentation: Push Notifications Onsite Messaging REST API
  1. Documentation
  2. Web Push Notifications
  3. Custom Strings

Localization

Customize user experience across different languages or pages of your website. Change the default strings & prompts based on your preference, and include the script above the integration code in the <head> section of a particular page or a lozalized version of your website.

Editable Custom Strings and Description

Field Default Value Description
lt-subscribe-box-1 Thanks for Subscribing! Shown after user subscribes (HTTP only).
lt-subscribe-box-2 Press close to continue. Shown after user subscribes (HTTP only).
lt-popup-title Click on Allow to get notifications. Shown after user subscribes (HTTP only).
lt-popup-subtitle Get real-time updates through Push Notifications. Shown after user subscribes (HTTP only).
lt-close Close Close button text shown after user subscribes (HTTP only).
lt-side-widget-title Notifications Side-widget title.
lt-widget-title Website Notifications Round and side-widget popup title.
lt-widget-text Get notifications in real-time for staying up to date with content that matters to you. Widget text, same can be edited in widget settings.
lt-widget-more-options-desktop Mouseover for more options Shown in widget.
lt-widget-more-options-mobile Tap for more options Shown in widget.
lt-subscribe Subscribe Subscribe button text.
lt-unsubscribe Unsubscribe Unsubscribe button text.
lt-not-now Not Now Not Now button text, shown on permission prompt.
lt-unsubscribe-box-1 Are you sure you want to unsubscribe? Shown when user tries to unsubscribe.
lt-yes Yes Yes button text.
lt-no No No button text.
lt-unblock-box-1 Please unblock notification in order to subscribe. Shown when user has blocked push notifications and tries to subscribe.
lt-unblock Unblock Unblock button text.
lt-cancel Cancel Cancel button text.
lt-notf-pref-title Notification Preferences Notification preferences dialog title.
lt-notf-pref-info-text You are currently subscribed to receive notifications. Notification preferences dialog info text.
lt-notf-pref-stop-usage Stop Usage Tracking Title for "Stop Usage Tracking" option.
lt-notf-pref-stop-usage-confirm Usage tracking has been stopped. Confirmation message for "Stop Usage Tracking" option.
lt-notf-pref-view-data View My Data Title for "View My Data" option.
lt-notf-pref-view-data-confirm Please wait, getting your data... Confirmation message for "View My Data" option.
lt-notf-pref-unsubscribe Unsubscribe & Delete All Data Title for "Unsubscribe" option.
lt-notf-pref-unsubscribe-confirm Unsubscribed and all data deleted. Confirmation message for "Unsubscribe" option.
lt-unblock-mobile You've blocked notifications. Please click on the lock pad icon in the address bar, go to Site Settings and enable "Notifications" under "Permission". Refresh the page. Steps to unblock notifications on Mobile.
lt-unblock-chrome You've blocked notifications. Please click on the lock pad icon in the address bar, then set "Notifications" permission to "Ask(default)". Refresh the page. Steps to unblock notifications on Chrome.
lt-unblock-firefox You've blocked notifications. Please click on the lock pad icon in the address bar, then click on the "x" next to "Blocked/Blocked Temporarily". Refresh the page. Steps to unblock notifications on Firefox.
lt-a2hs-text Add {app_name} App to your Home Screen to get regular updates. Tap Share {share_icon} and then Add to Home Screen {add_icon} Text to help website vistior to add your website as web app on iOS and iPadOS.
subscriptionTitle Get our Latest News and Updates Opt-in Box - Title Text
subscriptionMessage Click on Allow to get notifications Opt-in Box - Message Text
subscriptionBtnAllowTxt Allow Opt-in Box - Allow Button Text
subscriptionBtnDenyTxt Later Opt-in Box - Deny Button Text

Usage

To customize prompts for a particular page on your website, or to enable different prompts based on a language, you need to include the above fields within a script, just above the integration code. You can choose particular fields to update, the rest will be taken from the default setup. The fields need to be included in a JSON array named pa_localized_str.

<script type="text/javascript">
    var pa_localized_str = {
        "lt-subscribe-box-1":"Thanks for Subscribing!",
        "lt-subscribe-box-2":"Press close to continue.",
        "lt-close":"Close",
        ...
   }
</script>
Copy

Localized String Generator

You can also use the Localized String Generator to create the script automatically. Just fill in the required strings and click on Generate to build the script. You can then copy the generated script to the head section. Do keep in mind that the script generator does not store any values, they are overwritten on reload.

Localized String Generator