Archive > Preference Center > Newsletter Categories

Table of Contents

Data Management Admin Tool

Use the data management tool to add, edit, and delete all filter by categories for the UPMC Dynamic Preference Center.

Access to the Flying Cork x UPMC back end data management tool is currently granted via email.

Manage Newsletter (Filter By) Categories

Visit the data management tool (via the access URL provided in an email) and navigate to Manage Newsletters and Categories > Categories.

The file below creates the functionality to add, edit, delete, and display all filter-by categories within the back end data management tool. Data manually populated into the back end then gets pulled into the front end of the UPMC Dynamic Preference Center. This data populates the filter by drop down menu within the “Available Subscriptions” section. 

The data from this section gets recorded in a data extension called Available_Categories, located here:

Add Category

Click “Add Category” to add a new category. These additions will immediately be reflected in the preference centers’ filter by drop down in the “All Subscriptions” section.

Edit/Delete Category

Click the “Edit” button to the right of the category to make changes to that particular category.
When category data is edited using the data management tool, the record in the Available_Categories data extension will also be updated, and changes are immediately reflected in the preference center.

Click the “Delete” button to the right of the category to delete it. 
When category data is deleted using the data management tool, the record in the Available_Categories data extension will also be deleted, and the category will no longer be available to filter by in the preference center.

Pair A Category With A Newsletter

Click here for information on pairing categories with newsletters.

Preference Center Interface

On Page Load/Generating the Dropdown

When the page loads, we pull the records from the Available_Categories Data Extension. We then generate the filter dropdown with the records returned by the DE with AMPscript.

In our DataExtensions JSON Object, we will have used the Subscription_and_Category DE to set the category (the ‘category’ key in PreferenceCenterData.DataExtensions) for each newsletter.

When we start to create the DOM objects for each newsletter, we pull from PreferenceCenterData.DataExtensions.category to create a class with the name of the category and apply it to the container of the new DOM object. We use this class to filter off of.

Filtering Newsletters

We run the filterNewsletters() function onChange, which will:

  • Create a new array, called divsToHide, containing all of the newsletter DOM objects
  • Grab the value (which would be the category) from the dropdown
  • Set all newsletters to display none, then loop back through the divsToHide array and set any newsletters matching the category pulled from the dropdown to display inline block.
Relevant Functions
filterNewsletters()

Decides what newsletters to show/hide based on a dropdown selection. The dropdown categories are populated via the Available_Categories data extension.


initializeSubscriptions()
This is the core function that populates the page on load. We use the sortByTitle() function to alphabatize
the array of objects, de_title_pairs. Once sorted we loop through the array and call the AddToMySubscriptions(),
AddToFeaturedSubscriptions(), and AddToAllSubscriptions() functions passing the DE name / publication list ID

 

Preference Center Data Processing

Your email address will not be published. Required fields are marked *