Welcome to WebmasterWorld Guest from 54.163.158.163

Forum Moderators: Robert Charlton & aakk9999 & andy langton & goodroi

Problem using "rich cards" and JSON-LD

     
9:19 pm on Feb 15, 2017 (gmt 0)

New User

10+ Year Member

joined:Jan 19, 2005
posts:7
votes: 0


Hi there, hope someone can help me.
I'm trying to use the google Rich Cards function to get my social media links to appear in the search result for my business.
I've put what I think is the appropriate code on the index page of my site, and got G to re-index it using the search console, but when I go into the Rich Cards part of the search console, it doesn't recognise that any exist. Below is the code I've used, if anyone can point out an obvious mistake I've made I'd be grateful.

<!-- start social profiles (https://developers.google.com/structured-data/customize/social-profiles) -->
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "Organization",
"name" : "Van XY",
"url" : "http://example.co.uk/",
"logo": "http://example.co.uk/images/smlogo.png",
"sameAs" : [
"http://www.facebook.com/example",
"http://www.twitter.com/Example_",
"https://plus.google.com/+example/",
"http://www.instagram.com/example/",
"https://www.linkedin.com/company/exam-ple"
]
}
</script>
<!-- end social profiles -->
<head>




[edited by: not2easy at 9:25 pm (utc) on Feb 15, 2017]
[edit reason] exemplified [/edit]

9:30 pm on Feb 15, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3048
votes: 113


A few minor edits helped keep your privacy intact. I don't use these codes, but many here do and should be able to help out with the task. The only thing notable for me is the "<head>" tag after the code. If that is not a typo, it would seem to leave the code out of the page.
9:44 pm on Feb 15, 2017 (gmt 0)

New User

10+ Year Member

joined:Jan 19, 2005
posts:7
votes: 0


Ah right, yes maybe that's it then. I read a tutorial that said to put it above the head, but now you mention it that probably doesn't make sense.
12:10 am on Feb 16, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3048
votes: 113


Most scripts like that are best just above the </head> tag. I hope it is something that easy to fix.


12:20 am on Feb 16, 2017 (gmt 0)

Preferred Member

Top Contributors Of The Month

joined:Apr 1, 2016
posts: 543
votes: 161


Here is blog post that appeared on the moz blog that does a good job of explaining how to implement JSON-LD.
[moz.com...]
3:01 am on Feb 16, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:14380
votes: 296


I have found that the best place to check for structured data information is Google and the official Schema.org website. The reason I say this is because the specifications/requirements are constantly changing. Always check Google and Schema.org for the definitive answer.

Here's what Google's developer page [developers.google.com] says about the social media structured data:

The SCRIPT block can be inserted anywhere on the page either the head or body of the page.


That means you can insert the code in the head section. That developers page also states this:

...insert this code into the page that shows users these profiles.


That means you can't insert the JSON-LD code on a page that does not visibly show the same social media profiles to a regular visitor. Could that be a problem with your deployment?
9:05 am on Feb 16, 2017 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11731
votes: 268


Mod's note: I've changed the title of this thread from
- Problem with "rich cards"
--- to...
- Problem using "rich cards" and JSON-LD


Additionally, I think you'll get a much better idea what that Moz article is about if you can see the sample code as it builds on the page and play with it. While we normally don't post tool names here, but I'm going to make an exception here and post names of several markup generators....

JSON-LD Schema Markup Generator
JD Flynn
[jamesdflynn.com...]

James Flynn's tool also inspired this one...

JSON-LD Schema Generator For SEO
Hall Analysis
[hallanalysis.com...]

Hope this helps.

PS: I'm also noting that WebmasterWorld has a group of free schema code generator tools, which look to be very promising. I haven't tried them. They cover person, movies, in-depth articles, books, events, online reviews, and online products....

Schema.org help
http://freetools.webmasterworld.com/category/schema-code-tools [freetools.webmasterworld.com]


[edited by: Robert_Charlton at 11:32 am (utc) on Feb 16, 2017]

9:24 am on Feb 16, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts:11
votes: 1


I've been trying to get all our social media tags on our Google Knowledge Graph.I've implemented the following markup but so far, only the Twitter account has been picked up. I've also noticed that some websites have the social tags without having the markup on their page. Does the markup actually work? Or do they just highlight the social media platforms you use most frequently?

<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"Organization",
"name":"insert business name",
"url":"http://www.businessname.co.uk",
"sameAs":["https://www.facebook.com/businessname/",
"https://twitter.com/businessname",
"https://www.instagram.com/businessname/"]
}
</script>

Cheers,

Rhys
11:55 am on Feb 16, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:14380
votes: 296


Markup works but the data must also be visible for the user.
12:38 pm on Feb 16, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts: 11
votes: 1


Do you mean the html needs to be visible on the page?
12:47 pm on Feb 16, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:14380
votes: 296


The standards on Google's website that I linked to above state that the references to social media within the JSON-LD code must also be visible to the user. The JSON-LD script can be in the head section but the references and links to your social media profiles must also be visible to the user.

The purpose of JSON-LD is to be able to specify structured data to search engines in the head section (or beneath it) without having to add schema markup to the HTML code in the page.

An example is the breadcrumbs. You can have the breadcrumb JSON-LD in the head section and the normal breadcrumb links that users would see in the html. The old way was to add schema markup to the breadcrumb links themselves. The JSON-LD way is less intrusive on your code.
2:01 pm on Feb 16, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts: 11
votes: 1


Sorry, I'm far from an expert on this. So, we have social media links on our page, but I've added this code (in addition to the social media links) to try and get our social media profiles to show up on the knowledge panel. The Schema code I copied above isn't used in the Head or in GTM, but I've just tested it on Google's markup tester and it works. Can't see what else it could be.
3:40 pm on Feb 16, 2017 (gmt 0)

Preferred Member

Top Contributors Of The Month

joined:Apr 1, 2016
posts: 543
votes: 161


Doing everything correctly according to Google's guideline in necessary but not sufficient for it to appear in the knowledge Graph. Google makes the final call as to what to shows or does not show, and there is nothing more that you can do.
3:49 pm on Feb 16, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts: 11
votes: 1


Oh, bother. Okay, cheers Nick.
9:17 pm on Feb 16, 2017 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11731
votes: 268


I agree with Nick. "Necessary but not sufficient" is an important phrase that deserves emphasis.

In addition to Google algorithmic factors, there's also user interaction. I've seen sites with Knowledge Graph cards that Google tested for a while and then dropped them, I'm sure because they either didn't attract clicks, or because they sent users to places that weren't user-satisfying.

There's also a whole art in building pages and websites that goes beyond code.

8:51 am on Feb 17, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts: 11
votes: 1


Yeah I've seen competitor sites have their social links in the knowledge graph card without the markup on their page, so I was wondering whether it was more to do with, for example, amount of interaction that platform gets - likes/shares/re-tweets/comments etc. That would ring true in our case because we use Twitter far more than the other platforms, and this is the one we've got on our knowledge card.
9:31 am on Feb 17, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 19, 2002
posts:3254
votes: 19


it takes several days for it to show up in webmaster tools, even after you have been spidered.
does anything show at all if you click the structured data link in seach console.
1:24 pm on Feb 17, 2017 (gmt 0)

New User

joined:Feb 16, 2017
posts: 11
votes: 1


The structured data has picked it up with no errors. The only thing I'm wondering is, I've used the code twice on the page (in different places at), but maybe that's not helping? But there are no errors. Also, I've run it through the Structured Data Testing Tool and it's all come out fine...
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members