Pooja
Pooja

Reputation: 1

Where can i put json code from my rich card

This is my Corporate Contacts rich card JSON code but I am getting error:

"All values provided for https://search.google.com/structured-data/testing-tool/ must have the same domain".

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "http://www.example.com",
  "contactPoint": [{
                    "@type": "ContactPoint",
                    "telephone": "+1-401-555-1212",
                    "contactType": "customer service"
                  }]
}
</script>

and I am confused where to put this code in my site

Upvotes: 0

Views: 425

Answers (1)

nmkyuppie
nmkyuppie

Reputation: 1476

Put it as like a normal javascript code.

For example,

<head>
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": "http://www.example.com",
      "contactPoint": [{
                        "@type": "ContactPoint",
                        "telephone": "+1-401-555-1212",
                        "contactType": "customer service"
                      }]
    }
    </script>
</head>

You can also test you rich card in Google Structured Data Testing Tool

https://search.google.com/structured-data/testing-tool/u/0/

Upvotes: 0

Related Questions