Script tag
Simply add the following code after the opening<head> tag and **before the closing **</head>tag.
How the script tag works
- The script tag loads quickly as your page content is being rendered, and figures out
- If a visitor key is present in the URL (e.g.
example.com/?kfor=abc123) - Which page path it’s on
- If a visitor key is present in the URL (e.g.
- If there’s no visitor key, it will gracefully exit early
- The script tag contacts the Kenobi API to get any transformations that might exist for the current page path, and then applies (changes elements) these to the page
- A listener for when the page path changes is activated in the background, and the visitor key should persist for the current browser tab (only)
Known issues
- Some navigation actions do not correctly sync with state (multi-page transformations are not rendered reliably)