Hi,
I have an Answers search bar on location pages and contact page. I want to be able to distinguish where users are coming from when arriving to the Answers results page. The querySource parameter will speak to the Analytics section of the Yext platform and allow us to filter by integration source.
I am redirecting from search bar to results page so I set up "initializeManually": true
in config/global_config.json and theme/answers-hitchhiker-theme/global_config.json answer repo
this is where I init Answers
function initAnswers() {lb}
ANSWERS.init({lb}
apiKey: ‘XXXXXXXX’,
experienceKey: ‘XXXXXXXXXX’,
experienceVersion: ‘PRODUCTION’,
locale: ‘en’,
businessId: ‘XXXXXX’,
querySource: ‘LOCATION_PAGE’,
onReady: function () {lb}
ANSWERS.addComponent(‘SearchBar’, {lb}
container: ‘.js-answers-form’,
redirectUrl: ‘XXXXXXX’,
placeholderText: ‘’,
submitIcon: ‘magnifying_glass’
but the search bar fail to function. I am able to make the search and redirect. However, nothing shows up in the result page, before I set up "initializeManually": true,
. I am able to make the query