Search box on google search results

flipkart.png

 

Look at the above screenshot, if you search for ‘flipkart’ on google you will be seeing a search box where you can search anything inside flipkart website, which could improve the site visits, which opens up a chance for more and more profits and transactions especially on a e-commerce website. How to do it? Pretty simple, just add the below script tag on header portion, everything else will be taken care of google crawler.

 

{
“@context”: “http://schema.org”,
“@type”: “WebSite”,
“url”: “https://www.yourwebsite.com/”,
“potentialAction”: [{
“@type”: “SearchAction”,
“target”: “https://www.yourwebsite.com/search?keyword={search_term_string}”,
“query-input”: “required name=search_term_string”
},{
“@type”: “SearchAction”,
“target”: “android-app://your-app-url/search/?keyword={search_term_string}”,
“query-input”: “required name=search_term_string”
}]
}

Note: Remember you should have a valid search url (functionality) already present on your website/app for this purpose, else you need to add one.