Our API will provide personalized content for your website and snippet will update the content on your page according to tempalte mapping.
Activating
To get personalized content on your website, you need to addpattern={patternId} query parameter to the URL. Where patternId is the ID of the content you want to use for personalization.
For example, if your website URL is https://example.com, you can add the pattern ID like this: https://example.com?pattern=patternId.
Listening to render completion event
You can listen to the render completion event by adding the following code:patternsRendered event is fired.
Enforcing updates on DOM changes
If you are using a single-page application (SPA) or updating the DOM dynamically, you can enforce the update by calling theupdatePatternDOM function.
Debugging
To enable debugging, you can set thedebug flag to true in the query parameter. For example: