如果您在Google上搜索某个网站,比如说flipkart,则下面会看到另一个带有占位符“ search flipkart.com”的搜索栏,如果我们在该搜索栏上进行搜索,则会打开flipkart.com上的相应页面
我也想在我的网站上实现它。
有人可以帮我吗?
我能弄清楚的是,架构更改必须在索引/主页上进行(PFA代码)。我在我的网站上尝试了此操作,但所做的更改未反映在Google上。
<script type="application/ld+json" nonce="9142258105932804691">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.flipkart.com/",
"potentialAction": [{
"@type": "SearchAction",
"target": "http://www.flipkart.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
},{
"@type": "SearchAction",
"target": "android-app://com.flipkart.android/flipkart/de_sq_seg_-search.flipkart.com-_{search_term_string}",
"query-input": "required name=search_term_string"
}]
}
</script>