SALESFORCE-MARKETING-CLOUD-PERSONALIZATION practice question 23 of 25

In which two locations in the page Type definition can a developer pass in attributes?

Full set: 120 questions
Answer options
A: is Match
B: onActionEvent Correct answer
C: cashDom
D: listeners Correct answer
Correct Answer:
B. onActionEvent; D. listeners
Explanation

Within a pageType definition in the Sitemap, attributes can be passed in two primary locations for capturing user interactions. The listeners array is used to define event handlers (e.g., for clicks) that can trigger an interaction and pass associated attributes. The onActionEvent function is a property specifically designed to handle events sent via the SalesforceInteractions.sendEvent API, allowing for dynamic capture of actions and their attributes, which is particularly useful for single-page applications (SPAs).

Why Incorrect

A. isMatch: The isMatch function is a predicate that returns a boolean. Its sole purpose is to identify if the current page corresponds to the pageType, not to pass data.
C. cashDom: This is likely a typo for cachedDom, which is a property used to cache DOM element selections for performance optimization, not for passing attributes.

References

1. Salesforce Help. Configure a Sitemap for a Single-Page Application. This document provides examples showing the use of both listeners and onActionEvent within a pageType definition to capture interactions with attributes. See the code samples for productDetailPageType and cartPageType.

2. Salesforce Help. Sitemap JavaScript Object Reference. The reference details the properties of the pageType object, explicitly listing listeners (Type: Array) and onActionEvent (Type: Function) as valid properties for handling events and data capture.

Scroll to Top