To support deeper customization, Cartographer provides a number of public API methods.
# currentProject v2
Returns current project configuration.
# currentFactors v2
Returns user input data vector, including both activated and non-activated answers.
afterUpdateFactor event for description of available factor data elements.
# currentActiveFactors v2
Returns user input data vector, including only activated answers.
Returns whether Cartographer is currently in the replay state, such as when restoring recommendations state after returning to the recommender from visiting recommended product detail page.
History Replay section for the description of managing history state.
Replays the provided history state array.
|Array of history events
# saveSession v3
Saves current session details.
|A callback to receive saved session key and session details.
# replaySession v3
Retrieves previously saved session details. Use
replay method to restore the previous quiz state.
|Previously saved session key.
|A callback to receive saved session details.
Deactivates given question without removing user selections. This is useful when implementing custom page routing and it is necessary to preserve selected answers rather than clearing them when returning to earlier pages.
|DOM element containing the question.
deactivateQuestion method, removes user selections from given questions and updates history state.
|jQuery list with DOM elements containing questions to remove selections from.
# navigateToPage v2
Navigates to any page preceding the current page. Target page must have been passed through by the user on the way to the current page, meaning it is not possible to jump recommendation tree branches using this method. Automatically deactivates and removes user selection from pages.
Only returning to the previously visited page is supported, and it is not possible to jump to not yet visited page.
|DOM element containing the target page.
# restart v2
Completely resets recommender state without reloading the page. As result of this method, all questions will be deactivated, user answers will be removed, and the first page will be displayed.
Retrieves current summary description.