The onPageMatched
function will run once all the triggers to the page it is assigned two are true
and the page has been matched. This can be used to add additional functionality.
This function can be async and will be awaited before the render API is called.
Syntax
onPageMatched: () => {}
onPageMatched: async () => {}
Usage
onPageMatched
can be any callback function and can included any code that needs to run once a specific page has been matched.
Example
onPageMatched: () => {
trackPdp(...)
}
In this example, we are using the onPageMatched
function to fire PDP tracking events.