Animated Search bar to only function on universal, or pull vertical prompts

Hey team!

I added animated search to my client’s search bar in their answers experience following the instructions here.

However, it animates the search bar across all tabs using the universal prompts. Is there a way to only have the animation occur on the universal tab? Or when in a specific vertical pull from the vertical prompts and NOT the universal prompts? Thanks!

Wanted to bump this - is there a way to do this?

Hi Tyler,

Thanks for your patience on this one! The solution here would likely involve modifying the API call that’s made in on_ready to hit the vertical search autocomplete endpoint instead of universal.

So this, for example, is universal:

// Make API Call to Options var url = 'https://liveapi-cached.yext.com/v2/accounts/me/answers/autocomplete'; url += '?v=20190101'; url += '&api_key=' + apiKey; url += '&sessionTrackingEnabled=false'; url += '&experienceKey=' + experienceKey; url += '&input='; url += '&version=' + experienceVersion; url += '&locale=' + locale; axios.get(url).then(function(response) {

Whereas vertical would be something like:

// Make API Call to Options var url = 'https://liveapi-cached.yext.com/v2/accounts/me/answers/vertical/autocomplete'; url += '?v=20190101'; url += '&api_key=' + apiKey; url += '&verticalKey' + verticalKey; url += '&sessionTrackingEnabled=false'; url += '&experienceKey=' + experienceKey; url += '&input='; url += '&version=' + experienceVersion; url += '&locale=' + locale; axios.get(url).then(function(response) {

You might also find this API documentation helpful: Vertical Search | Hitchhikers

Let us know if you have any other questions!