Hello,
After ensuring that "initializeManually"
is set to true
, you’ll have to set the query source and manually initialize the experience on the search results page. Here is an example of that compared to the normal JS Snippet integration:
Basic JS Snippet for Search Results Page:
<div id="answers-container"></div>
<script src="REPLACE_ME_PRODUCTION_URL/iframe.js"></script>
JS Snippet with Manual Initialization and Setting of Query Source
<div id="answers-container"></div>
<script src="REPLACE_ME_PRODUCTION_URL/iframe.js"></script>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
AnswersExperienceFrame.runtimeConfig.set('querySource', 'SOURCE_NAME');
AnswersExperienceFrame.init({});
})
</script>
Best,
DJ