AddSearch crawls your website and takes screen captures of your web pages to show next to your search results in the search-as-you-type Widget view.
Some websites have obtrusive elements, such as a cookie consent banner or a newsletter popup, that appear after the page is loaded. These elements may appear in the screen capture, obscuring the content of the page.
To show the elements that you don’t wan’t to appear on the screen capture only to others than the AddSearchBot, you can add the following JavaScript on your website:
if (navigator.userAgent.indexOf('AddSearchBot') == -1) { // Not AddSearch crawler // Show the obtrusive elements like a cookie consent // or "join our newsletter" modal }
Or you can hide the element for just AddSearchBot using a custom CSS rule with the following code:
if (navigator.userAgent.indexOf('AddSearchBot') != -1) { var x = document.getElementById("cookies-message"); x.style.display = "none"; }
We’re always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team.