I'm trying to implement the snippet for the sitelinks search box on Google, according to the documentation in https://developers.google.com/webmasters/richsnippets/sitelinkssearch.
My implementation is the following:
<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>
The target works if you replace {Q} by a keyword and the name of the search field is "Q". Is there something wrong with this implementation?
I've put the code inside the body tag, at the bottom of the page.