Skip to main content
Our API will provide personalized content for your website and snippet will update the content on your page according to tempalte mapping.
To install the snippet you need to paste the following code into your website’s HTML:

Activating

To get personalized content on your website, you need to add pattern={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:
If you are making some kind of anti-flicker solution, you can hide the content until the 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 the updatePatternDOM function.
Or you can pass enforce flag during the initialization:
In that case it will take care of updating the content on the page when the DOM changes.

Debugging

To enable debugging, you can set the debug flag to true in the query parameter. For example:
This will log the debug information to the console, which can help you troubleshoot any issues with the snippet.