The "Page Type Array Objects" section refers to how you configure individual page types in a sitemap configuration for Salesforce Personalization (formerly Evergage). Each page type configuration allows you to define how the system should identify specific pages on your website and what actions or data should be captured on those pages.
Page Type Configuration:
Each page type configuration is an object that defines:
name: A string representing the name of the page type.
isMatch: A function that returns a boolean or a Promise resolving to a boolean, indicating whether the current page matches the defined page type.
isMatch Function:
This function is crucial because it determines whether a particular page type configuration should be applied to the current page.
The sitemap evaluates all page types in the array but only applies the first one whose isMatch function returns true. If no page types match, no event is sent to Salesforce Personalization.
Global Configuration vs. Page Type Configuration:
Global Configuration: Applies to all pages and includes general settings like onActionEvent, contentZones, and listeners.
Page Type Configuration: Defines settings specific to certain types of pages, like the homepage, login page, or cart page.