Trigger Preference Modal Box to let subscribers manage their notification preferences

This is used to explicitly trigger the Preference Modal Box to let subscribers manage their notification preferences.

Parameters

  1. triggerPreferences: Command to trigger the Preference Modal Box.

  2. settingsObject:(Type: DictionaryStrings, Optional):
    Contents of 'Settings Object' Dictionary:

    i. **Modal Title text:**(Type: String, Default: ‘You are subscribed to notifications from <account_company_name>’) - This is the general descriptive heading for the preference modal box.
    
    ii. **Start Tracking Button text:** (Type: String, Default: ‘Start Usage Tracking’) - This button lets subscribers restart their usage tracking if previously stopped.
    
    iii. **Stop Tracking Button text:** (Type: String, Default: ‘Stop Usage Tracking’) - This button lets subscribers stop their usage tracking.
    
    iv. **Access Data Button text:**(Type: String, Default: ‘Access My Notifications Data’) - This button lets subscribers download all their data stored at VWO Engage's end from your account.
    
    v. **Delete Data Button text:**(Type: String, Default: ‘Unsubscribe and Delete All My Data’) - This button lets subscribers unsubscribe from Web Push Notifications on your website and delete all their data stored at VWO Engage's end.
    

Functionality

  1. If User is not subscribed: Does not show the Preference Modal Box.

  2. If User is subscribed: Shows the Preference Modal Box with the default values.

  3. If User has blocked: Does not show the Preference Modal Box.

  4. If User has unsubscribed: Shows the preference modal box. However, user can't take any action on this modal.

Example code:

window._pcq = window._pcq || [];
_pcq.push(['triggerPreferences']); //Calls Preference Modal Box with the default text


window._pcq = window._pcq || [];
_pcq.push(['triggerPreferences', 'Modal Title', 'Start Button', 'Stop Button', 'Access Data Button', 'Delete Data Button']); //Calls Preference Modal Box with the given custom texts

Please Note: The order of the text parameters is important.