Resurface Preference Center message

   Permission: Campaign entities

The Preference Center message JavaScript code is a snippet that is added to a web property and allows an end-user to resurface a Preference Center message. Using this link/button, end-users can directly manage their marketing preferences on an ongoing basis. 


Configure resurface Preference Center message Javascript code

The code snippet to resurface your Preference Center message uses a loadPreferenceCenter function to pass the Preference Center message ID and the end-user's email address.

Retrieve the Preference Center message ID by clicking Messages on the left-hand panel and selecting Preference Center

Screenshot 2024-08-12 at 2.32.53 PM.png

Use the property field in the upper right-hand corner to select a property for which you will resurface a Preference Center message.

Screenshot_2024-06-25_at_9_24_12 AM.jpg

Navigate to your Preference Center message in the list and copy the ID inline with the Preference Center message name.

Screenshot 2024-06-25 at 10.41.44 AM.png

In addition to the Preference Center message ID, your organization will need a way to pass your end-user's email address to the function. This argument is required as every end-user's Preference record stored by Sourcepoint is associated with that end-user's email address. 

Format the resurface Preferences message Javascript code so it adheres to the following:

window._sp_.preferences.loadPreferenceCenter(PREF_MSG_ID, 'USER_EMAIL')

Implement resurface Preference Center message Javascript code

Attach the Preference Center message JavaScript code to an event handler on your property. Most organizations who implement the JavaScript code on their page will attach the function to the onclick event of a page element.

<button onclick="window._sp_.preferences.loadPreferenceCenter(28458, 'test@email.com')">Marketing Preferences</button>
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.