https://developers.google.com/webmasters/richsnippets/sitelinkssearchのドキュメントに従って、Google のサイトリンク検索ボックスのスニペットを実装しようとしています。
私の実装は次のとおりです。
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.petmd.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.petmd.com/search?Q={Q}",
"query-input": "required name=Q"
}
}
</script>
{Q} をキーワードに置き換え、検索フィールドの名前が「Q」の場合、ターゲットは機能します。この実装に何か問題がありますか?
ページの下部にある body タグ内にコードを配置しました。