AndZyk Posted May 30, 2016 Share Posted May 30, 2016 As a web developer I always want to improve the search results of my websites in popular search engines. Because of that I find the topic of structured data very interesting and want to learn more about them. Recently I tried out a few of the ways how to provide more information to a website and want to share my solutions. Most of the structured data can be included directly in the markup or as JSON-LD at the end of your document (right before the closing body tag). I prefer the last one, because I don't like to have bloated HTML markup. Breadcrumbs Breadcrumbs are an alternative way to show the your page hierarchy inside search results, instead of showing just the plain URL. Just like the breadcrumbs on a website. Following the example, I ended up with this code: <?php if(strlen($page->parents()) > 0) { ?> <!-- Breadcrumbs --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "BreadcrumbList", "itemListElement": [ <?php $positionCounter = 1; $separator = ','; foreach($page->parents() as $parent) { if($parent->id == $page->parents()->last()->id) { $separator = ''; } echo ' { "@type": "ListItem", "position": "' . $positionCounter . '", "item": { "@id": "' . $parent->httpUrl . '", "name": "' . $parent->title . '" } }' . $separator . ' '; $positionCounter++; } ?> ] } </script> <?php } ?> First I am checking if the page has parents, then I follow the follow the markup of the example. I save the position of each parent in the variable positionCounter and increase its amount after each loop. As a last step I tried to end the JSON objects by not include the separating comma after the last object. This is why I am using the separator variable. Site name and sitelinks searchbox Using JSON-LD you can provide an alternative site name and a sitelinks searchbox inside the search results (Inception ). <!-- WebSite --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "name" : "Your site name", "alternateName" : "Your alternative site name", "url": "<?= $pages->get(1)->httpUrl ?>", "potentialAction": { "@type": "SearchAction", "target": "<?= $pages->get(1)->httpUrl ?>search/?q={search_term_string}", "query-input": "required name=search_term_string" } } </script> I am not 100% sure, if the sitelinks searchbox works this way. Maybe someone who made this work before could confirm it, that would help me out. Organization For organizations you could provide a logo and links to your social profiles. <!-- Organization --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type" : "Organization", "name" : "Your organization name", "url" : "<?= $pages->get(1)->httpUrl ?>", "logo": "<?= $pages->get(1)->httpUrl ?>site/templates/images/logo.png", "sameAs" : [ "https://www.facebook.com/your-organization-url", "https://www.instagram.com/your-organization-url/" // All your social profiles ] } </script> This one I think is self explanatory. Article If you have an blog or a news site you could enhance your articles with structured data with an thumbnail and author. <?php if($page->template == "post") { ?> <!-- Article --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "NewsArticle", "mainEntityOfPage": { "@type": "WebPage", "@id": "<?= $page->httpUrl ?>" }, "headline": "<?= $page->title ?>", "image": { "@type": "ImageObject", "url": "<?= $page->thumbnail->httpUrl ?>", // Image field in template "height": <?= $page->thumbnail->height ?>, "width": <?= $page->thumbnail->width ?> }, "datePublished": "<?= date('c', $page->created) ?>", "dateModified": "<?= date('c', $page->modified) ?>", "author": { "@type": "Person", "name": "<?= $page->createdUser->first_name . ' ' . $page->createdUser->last_name ?>" // Text fields added to core module ProcessProfile }, "publisher": { "@type": "Organization", "name": "Your organization name", "logo": { "@type": "ImageObject", "url": "<?= $pages->get(1)->httpUrl ?>site/templates/images/logo.png", "width": 244, // Width of your logo "height": 36 // Height of your logo } }, "description": "<?= $page->summary ?>" // Text field in template } </script> <?php } ?> Here I am enabling structured data for the template called post. I also have the text fields first_name and last_name added to the core module ProcessProfile, the image field thumbnail and the text field summary added to the template. Just a small note: I know you could use $config->httpHost instead of $pages->get(1)->httpUrl, but I found the second one more flexibel for changing environments where you have for example HTTPS enabled. Those are the structured data I have in use so far. I hope I haven't made a mistake, at least the testing tool doesn't complain. But if you find something, please let me know. I love how easy it is with ProcessWire to get all the information from various pages and use them in this context. As mentioned above, I am nowhere an expert with structured data, but maybe some of you would like to provide also some examples in this thread. Regards, Andreas 13 Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 30, 2016 Share Posted May 30, 2016 I can certainly see the intent, but I'm always cringing when I see something like that. A website is first and foremost for users and I'm not really seeing why the user should download 1.5 times the size of data, just to have lot's of (duplicate) content appended in a only machine readable format. In my mind, if it should be machine readable then supply an api to do so. It might seem verbose, but I'm more in favor of something like h-card, which is just wrapping around existing content. But in the end I'm also the one being quite glad about hardly working in the hell of SEO 2 Link to comment Share on other sites More sharing options...
AndZyk Posted May 30, 2016 Author Share Posted May 30, 2016 That is a valid point and after all structured data are completely optional. There are a lot of trends, like the recent AMP project of Google for example, where I am thinking likewise, but as developer you sometimes have to make compromises to increase your audience. Link to comment Share on other sites More sharing options...
Macrura Posted May 30, 2016 Share Posted May 30, 2016 I'm doing all my structured data with helper functions, and for most sites i will have around 5-6 schema.org types. I have found that this is a major benefit for SEO, and for search results accuracy in general. Not to mention that some other 'competing' CMSs provide some structured data plugins or out-of-the box generated markup, and while it is generated automatically and therefore not always totally accurate, it has been shown to give some of those sites an edge on search rankings, and placement in things like google events, or news. 1 Link to comment Share on other sites More sharing options...
Craig Posted May 30, 2016 Share Posted May 30, 2016 I'm starting to add some structured data to sites too, where relevant, to see what sort of impact it does have on search results. From a technical perspective though, I'd highly recommend using json_encode() over generating strings. Here's one I made earlier (very simple): <?php $socialLinks = array( 'facebook' => 'https://www.facebook.com/BestPageEver', ); $ldJson = array( '@context' => 'http://schema.org', '@type' => 'Organization', 'name' => $homepage->title, 'url' => $homepage->httpUrl, 'sameAs' => array(), ); foreach ($socialLinks as $name => $url) { $ldJson['sameAs'][] = $url; } ?> <script type="application/ld+json"> <?= json_encode($ldJson, JSON_PRETTY_PRINT); ?> </script> 7 Link to comment Share on other sites More sharing options...
Peter Knight Posted May 31, 2016 Share Posted May 31, 2016 Always great to read someone elses approach. Personally, I never noticed much of an SEO benefit from rich snippets and structured data but it was very early days when I first started evaluating them. At the time they were a new format and were considered to be a minor ranking signal to Google. I did read (somewhere) just this week that Google are about to give structured data much more weight as a ranking signal but can't find the article now. Will post here if I can locate it. Link to comment Share on other sites More sharing options...
AndZyk Posted May 31, 2016 Author Share Posted May 31, 2016 @Macrura: Exactly that is the reason, why I want to dig deeper into this topic. I also noticed, that some WordPress themes for example provide a basic support for structured data. But mostly they are not very accurate and assume a lot of the data or generalize them. Luckily with the API of ProcessWire you have complete control of your data you want to use. If you have some examples you would like to share, feel free to do so. The main purpose of this thread was to see if some of you also want to share your experience with structured data. @Peter Knight: The benefit I noticed so far is that the search results provide more information (especially with breadcrumbs). But I don't have them in use for very long and Google takes its time to update their indexes, although they are fast compared to other search engines. So time will tell the difference. If you ever remember the article you have read, I would be interested in a link. @Craig A Rodway: Thank you for the hint. Using json_encode() is much more elegant than my original solution. I updated my code and you can see it below. This time I haven't separated my code into sections. Also there are probably still some thinks I can improve. <?php $homeUrl = $pages->get(1)->httpUrl; // Organization $organization = array( "@context" => "http://schema.org", "@type" => "Organization", "name" => "Your organization name", "url" => $homeUrl, "logo"=> "{$homeUrl}site/templates/images/logo.png", "sameAs" => [ "https://www.facebook.com/your-organization-url", "https://www.instagram.com/your-organization-url/" ] ); // WebSite $website = array( "@context" => "http://schema.org", "@type" => "WebSite", "name" => "Your site name", "alternateName" => "Your alternative site name", "url" => $homeUrl, "potentialAction" => [ "@type" => "SearchAction", "target" => "{$homeUrl}search/?q={search_term_string}", "query-input" => "required name=search_term_string" ] ); // Breadcrumbs $breadcrumbs; if(strlen($page->parents()) > 0) { $listItems = array(); $positionCounter = 1; foreach($page->parents() as $parent) { $listItems[] = [ "@type" => "ListItem", "position" => $positionCounter, "item" => [ "@id" => $parent->httpUrl, "name" => $parent->title ] ]; $positionCounter++; } $breadcrumbs = array( "@context" => "http://schema.org", "@type" => "BreadcrumbList", "itemListElement" => $listItems ); } // Article if($page->template == "post") { $article = array( "@context" => "http://schema.org", "@type" => "NewsArticle", "mainEntityOfPage" => [ "@type" => "WebPage", "@id" => $page->httpUrl ], "headline" => $page->title, "image" => [ "@type" => "ImageObject", "url" => $page->thumbnail->httpUrl, "height" => $page->thumbnail->height, "width" => $page->thumbnail->width ], "datePublished" => date('c', $page->created), "dateModified" => date('c', $page->modified), "author" => [ "@type" => "Person", "name" => "{$page->createdUser->first_name} {$page->createdUser->last_name}" ], "publisher" => [ "@type" => "Organization", "name" => "Your organization name", "logo" => [ "@type" => "ImageObject", "url" => "{$homeUrl}site/templates/images/logo.png", "width" => 244, "height" => 36 ] ], "description" => $page->summary ); } ?> <!-- Schema --> <!-- Organization --> <script type="application/ld+json"> <?= json_encode($organization, JSON_PRETTY_PRINT); ?> </script> <!-- WebSite --> <script type="application/ld+json"> <?= json_encode($website, JSON_PRETTY_PRINT); ?> </script> <?php if(strlen($page->parents()) > 0) { ?> <!-- Breadcrumbs --> <script type="application/ld+json"> <?= json_encode($breadcrumbs, JSON_PRETTY_PRINT); ?> </script> <?php } ?> <?php if($page->template == "post") { ?> <!-- Article --> <script type="application/ld+json"> <?= json_encode($article, JSON_PRETTY_PRINT); ?> </script> <?php } ?> Regards, Andreas 1 Link to comment Share on other sites More sharing options...
Macrura Posted May 31, 2016 Share Posted May 31, 2016 sure, here are some examples, i have these in a file called schema_helpers.php, which is in my shared functions folder: 1.) function siteSchema() { $page = wire('page'); $schema = array( "@context" => "http://schema.org", "@type" => "Website", "url" => wire('pages')->get(1)->httpUrl, "name" => $page->title, "description" => '', "potentialAction" => array( "@type" => "SearchAction", "target" => wire('pages')->get(1000)->httpUrl . "?q={search_term}", "query-input" => "required name=search_term" ), "about" => array( "@type" => "Thing", "name" => "A very interesting THING", "description" => "Website about a very interesting THING" ) ); if($page->summary) { $schema['description'] = $page->summary; } else { unset($schema['description']); } return '<script type="application/ld+json">' . json_encode($schema) . '</script>'; } 2.) News function jsonldNews($item, $settings) { $image = $item->image ?: getFallbackImage($item); if(!$image) return; $out = ''; $jsonld = array(); $jsonld["@context"] = "http://schema.org/"; $jsonld["@type"] = "NewsArticle"; $jsonld["name"] = $item->title; $jsonld["headline"] = $item->title; $jsonld["url"] = $item->httpUrl; $jsonld["mainEntityOfPage"] = array( '@type' => "WebPage", '@id' => $item->httpUrl ); $jsonld["description"] = $item->summary; $jsonld["datePublished"] = date(DATE_ISO8601, $item->published); $jsonld["dateModified"] = date(DATE_ISO8601, $item->modified); $jsonld["dateline"] = date(DATE_ISO8601, strtotime($item->news_date)); $jsonld["wordCount"] = str_word_count($item->body); $jsonld['author'] = $settings['author']; $jsonld['publisher'] = $settings['entity']; $jsonld['articleBody'] = $item->body; $jsonld['articleSection'] = $item->categories_select->first()->title; // Publisher $pubLogo = wire('pages')->get(3525)->image; if($pubLogo) { $pubLogo = $pubLogo->height(60); $jsonld['publisher'] = array( '@type' =>'Organization', 'name' => 'A Publisher', 'url' => 'https://publisher.org/', 'logo' => array ( '@type' => 'ImageObject', 'url' => $pubLogo->httpUrl, 'height' => $pubLogo->height, 'width' => $pubLogo->width ) ); } // News Items may have a featured image $image = $image->width(696); $jsonld['image'] = array( "@type" => "ImageObject", 'url' => $image->httpUrl, 'height'=> $image->height, 'width' => $image->width ); $out .= '<script type="application/ld+json">' . json_encode($jsonld) . '</script>'; return $out; } 3.) Event function jsonldEvent($event) { if(!$event->event_location_select) return; if($event->template == 'event-child') { // inherit unset fields needed $event->event_link = $event->event_link ? : $event->parent->event_link; $event->body = $event->body ? : $event->parent->body; $event->event_location_select = $event->event_location_select ? : $event->parent->event_location_select; $event->price = $event->price ? : $event->parent->price; $event->currency_code = $event->currency_code ? : $event->parent->currency_code; $event->link = $event->link ? : $event->parent->link; } $out = ''; foreach($event->event_date_m as $ed) { $jsonld = array(); $date8601 = date(DATE_ISO8601, strtotime($ed)); $jsonld["@context"] = "http://schema.org/"; $jsonld["@type"] = "MusicEvent"; $jsonld["name"] = $event->title; $jsonld["url"] = $event->event_link; $jsonld["description"] = $event->body; $jsonld["startDate"] = $date8601; if($event->event_location_select) { $state = $event->event_location_select->state ? $event->event_location_select->state->title : $event->event_location_select->address_state; $jsonld["location"] = array( "@type" => "Place", "name" => $event->event_location_select->title, "url" => $event->event_location_select->link, "address" => array( "@type" => "PostalAddress", "streetAddress" => $event->event_location_select->address_street, "addressLocality" => $event->event_location_select->address_city, "addressRegion" => $state, "postalCode" => $event->event_location_select->address_zip, "addressCountry" => $event->event_location_select->country->title ) ); } if($event->price && $event->currency_code && $event->link) { $jsonld["offers"] = array( "@type" => "Offer", "description" => "Tickets", "price" => $event->price, "priceCurrency" => $event->currency_code, "url" => $event->link ); } $out .= '<script type="application/ld+json">' . json_encode($jsonld) . '</script>'; } return $out; } Also - I don't think you need to use JSON_PRETTY_PRINT 5 1 Link to comment Share on other sites More sharing options...
Craig Posted May 31, 2016 Share Posted May 31, 2016 Also - I don't think you need to use JSON_PRETTY_PRINT It's not necessary at all. I just find it handy when debugging to see the output in a more human-readable way Thanks for sharing your examples. Link to comment Share on other sites More sharing options...
AndZyk Posted May 31, 2016 Author Share Posted May 31, 2016 I also would like to thank you for sharing your examples. Wrapping the data blocks in helper functions is smart. There is much I can learn from. It's not necessary at all. I just find it handy when debugging to see the output in a more human-readable way That was also the reason I let JSON_PRETTY_PRINT enabled. The final JSON-LD is in my case minified with ProCache. Link to comment Share on other sites More sharing options...
Macrura Posted May 31, 2016 Share Posted May 31, 2016 I always use the google testing tool anyway to see how the data is being read, so i never even look at the source code (lol) Link to comment Share on other sites More sharing options...
AndZyk Posted May 31, 2016 Author Share Posted May 31, 2016 You mean the one Facebook is providing? If so I am not quiet following how open graphs are related to structured data? I used so far the testing tool from Google. But for developing I had most of the time the source code directly opened to check if everything is looking the right way. Link to comment Share on other sites More sharing options...
Macrura Posted May 31, 2016 Share Posted May 31, 2016 oops sorry meant this https://search.google.com/structured-data/testing-tool to see the json i usually dump it to tracy debugger 2 Link to comment Share on other sites More sharing options...
Marco Ro Posted May 4, 2018 Share Posted May 4, 2018 Hi Guys, First thank you for sharing your knowledge! These post help me a lot! I have also created a separate php file, but I have a doubt because from manuals should be inserted in the <head> and I have just include the php file inside it. But if I think well it in the web inspector I have never seen any code referring to the Structured Data like <script type="application/ld+json">. Why this? OK, maybe I may not have seen enough sites, but I can not find even on well-known sites. Could be a great if I use a js file and adding this? or I see many site have only the google tag manager link. Do you think the google tool are better and is enough? 1 Link to comment Share on other sites More sharing options...
dragan Posted May 5, 2018 Share Posted May 5, 2018 @AndZyk Did the breadcrumbs + searchbox feature actually work with your client site(s)? Today I was reading the official Google docs, but when I search for pinterest (searchbox example) or the book example for breadcrumbs) I don't see those things. I even fired up different browsers or went into incognito mode, but still nothing. Google is well-known for throwing out features and tools, just to neglect them soon afterwards. If these things have been shut down, I'm not going to bother with the extra effort, or even going to advertise such features as a "nice-to-have" SEO add-on. Link to comment Share on other sites More sharing options...
AndZyk Posted May 6, 2018 Author Share Posted May 6, 2018 Hello @MarcoPLY, I am glad this post helped you. On 5/4/2018 at 11:34 AM, MarcoPLY said: But if I think well it in the web inspector I have never seen any code referring to the Structured Data like <script type="application/ld+json">. Why this? OK, maybe I may not have seen enough sites, but I can not find even on well-known sites. JSON-LD is the recommended format for structured data. JSON-LD is JSON for Linked Data. Adding structured data with JSON-LD inside <body> is still valid, but usually it is placed inside <head> for better separation. Most of search engine specific code goes inside <head>. On 5/4/2018 at 11:34 AM, MarcoPLY said: Could be a great if I use a js file and adding this? You could try the jsonld.js preprocessor, but I think it would be easier just to use PHP, since that is the easiest way to get data from ProcessWire. On 5/4/2018 at 11:34 AM, MarcoPLY said: or I see many site have only the google tag manager link. Do you think the google tool are better and is enough? As far as I know is Google Tag Manager a different tool. Google Tag Manager is great for example online shops, where you want to track the customer experience. It seems to be an analytics tool for internal analytics, but has probably no effect on search results. But I have never used Google tag manager, just watched a few videos, so I could be wrong. Hello @dragan, 21 hours ago, dragan said: Did the breadcrumbs + searchbox feature actually work with your client site(s)? Breadrcumbs has worked for me, although it is not very useful on websites with only one parent-page. ? Searchbox, Organization and Article hasn't worked for me. ? 21 hours ago, dragan said: Google is well-known for throwing out features and tools, just to neglect them soon afterwards. If these things have been shut down, I'm not going to bother with the extra effort, or even going to advertise such features as a "nice-to-have" SEO add-on. I don't think they will neglect structured data, but the support seems to be lacking. On Google I/O 2017 for example they announced upgrades to the Structured Data Testing Tool, but the upgrade doesn't seem to be available yet. In my opinion I am not that convinced of structured data compared to the time I have wrote this post. The extra effort is not that time consuming, but the results are a little bit disappointing. So I can totally understand if you don't want to bother with it. ? Regards, Andreas 2 Link to comment Share on other sites More sharing options...
dragan Posted May 6, 2018 Share Posted May 6, 2018 Thanks for your feedback @AndZyk. Well, what do you know - I'll be attending a full-day Google Analytics workshop @ Google Zurich end of May. I'm going to ask Google staff if they know more about structured data (though chances are, they will be giving me the usual runaround... "that's another department, ask there"). I also actually gave feedback on those two doc pages, but who knows who will read this - and if they're going to bother editing / clarifying the docs. 2 Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 7, 2018 Share Posted May 7, 2018 16 hours ago, AndZyk said: In my opinion I am not that convinced of structured data compared to the time I have wrote this post. The extra effort is not that time consuming, but the results are a little bit disappointing. My opinion on JSON-LD markup is the total opposite. It works really well for my (testing) sites and for clients. By now we talk about 30+ sites so finding are quite solid in my opion. There are a few things I noticed when working with JSON-LD or any other kind of meta-data/rich-snippets. Organization Implementation: easyResults: may varyFinding: better results when used together with Google Business and when there is a good amount of BRANDED queries Product Implementation: mediumResults: Rich snippets in search results with pricings, stock infos, much higher CTRFinding: takes up to a week for the first results to show up Review Implementation: mediumResults: rich snippets like Product but with additional rating stars, CTR even slightly betterFinding: takes up to a week for the first results to show up Breadcrumbs Implementation: easyResults: may vary - larger sites benefit from it way better than small sites and one-pagerFinding: don't try to trick Google - use the same data as on the page (same title, same url, same everything) otherwise pages can drop or can disappear Site search Implementation: easyResults: may vary when sites are too smallFinding: the bigger the site, the more products it containts, the more "BRAND PRODUCT/CONTENT" queries Google notices the more likely Google will place a site search in search results - working example: https://www.otto.de/ (not one of my clients) Article Implementation: easyResults: may varyFinding: works well for recent news, breaking news - not so working well on old or outdated posts and small blogs/sites. Recipes Implementation: mediumResults: huge snippets, high CTRFinding: you should be one of the very first with that recipe otherwise your snippet will not show up Events Implementation: mediumResults: may vary in many ways - sometimes you get a nice event list under your site, sometimes your events show up for totally different queries that belong some how to your event (listed on event sites or for that very special location)Finding: it's a good idea to create JSON-LD for events as the results can spread across the web for all kinds of search queries - perfect for events you want to see everywhere on not just for your site/your brand. 2 Link to comment Share on other sites More sharing options...
Marco Ro Posted May 7, 2018 Share Posted May 7, 2018 @wbmnfktr I do not have the same amount of sites as feedback but I think like you. Specially for the products or whatever if you sell something have a Rich snippets is so important. I think this is more the a Implementation: medium. Everything grow your CTR just a bit must definitely use it! I don't know if you never use but how use the Review and aggregateRating ? This could be important to increase product reliability and trust in the site, and for what I know (i never try) if link Google Business the review will be connected to the specific product and show up on the google page and in the snippets you can see the yellow star if it's using the aggregateRating tag. But I don't really feel to add the Review directly inside the Structured Data. What you think about? Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 7, 2018 Share Posted May 7, 2018 2 minutes ago, MarcoPLY said: Implementation: medium It depends on the products you work with. Clothing can be super work-intensive but by now all products and data I had to work with were easy to implement in JSON-LD as everything exists in that special ProcessWire page. So we can say: medium to lots-of-work in this case. 2 minutes ago, MarcoPLY said: Review and aggregateRating I use whatever is possible. I had sites/products were no real ratings existed so we left them out. Faking reviews or ratings should be avoided. Google will find out about those sneaky tricks. They did in the past, the will in the future. The star ratings are a fantasic CTR booster. Combined with some more on-page work in title and description you can boost the results even more. When there are real reviews for a product then test it. Take one product, add the review(s) and check the results every 2 days for at least 6 weeks. A little side-note: changing existing pages and adding JSON-LD can bring your results down for a short period of time. At least did we notice these changes with some projects. Since then we update only small chunks of product pages at a time. Within 4 weeks those sites sometimes drop 3 to 10 places but come back much stronger and stay. Google Business and Reviews ... I guess you think of Search Console by Google. There are tools in it that help Google and your site with Rich data. Google Business can help you with things like Local SEO, Social SEO and citations. If you or your client can see a good amount of Branded queries you shouldn't only consider Google Business you have to take care of that. 1 Link to comment Share on other sites More sharing options...
Marco Ro Posted May 7, 2018 Share Posted May 7, 2018 yes @wbmnfktr is true, some time to make a completely schema can mean a lot of work! With pw is possible to create on the template an excellent base that is already enough! I agree with you about the Reviews, I will wait at the moment and test it later with some really reviews when we will have. The thing about the star ratings is that you can not have if you don't have any review. About the Google Business yes was the one for the local seo, this also can work like a reference page. But you're right, I checked better and is not in correlation with the Structured Data. It's better use for other way. Instead the Search Console could be connected. Thank you! also for the note it's very good to know!! I will test it. Link to comment Share on other sites More sharing options...
AndZyk Posted June 3, 2018 Author Share Posted June 3, 2018 On 5/7/2018 at 9:17 AM, wbmnfktr said: My opinion on JSON-LD markup is the total opposite. It works really well for my (testing) sites and for clients. By now we talk about 30+ sites so finding are quite solid in my opion. Hello @wbmnfktr, maybe I will give Structured Data another chance. I haven't tried anymore than I wrote in my initial post. You seem to be really experienced with Structured Data. If you have some examples or code snippets you would like to share, I think many people would appreciate it. ? Regards, Andreas Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 3, 2018 Share Posted June 3, 2018 You definitely should give them another try @AndZyk. Since your first post a lot of things changed. Am I really experienced? Maybe kind of. Ask me this when I finished the next 100 projects with lots of rich snippets/schema-markup. ? My examples and code snippets wouldn't be any different than any other resource out there. I really love this tool: https://technicalseo.com/seo-tools/schema-markup-generator/ You can create several kinds of markup as an example and implement them in your project. Those examples are a great starting point for everything. From breadcrumb to review or events. Test your markup over at Google and do what they want you to optimize in your markup: https://search.google.com/structured-data/testing-tool/u/0/ Check the schema.org definitions and guides for more details: http://schema.org/ Set up Google Search Console, check your markup with it and let Google crawl your optimized sites. Get reportings on errors and fix them fast. As written before: start with small parts of site (if possible) check results every 2 days for several weeks don't try to trick Google don't fake reviews don't fake review-counts or anything else If you are into Local SEO do the basics and create company and localBusiness markup with everything you can (logo, social profiles, site search, opening hours, ...), connect to Google My Business. Feel free to contact me or ask whatever you want. It's easier for me to answer a question right now. 5 Link to comment Share on other sites More sharing options...
Marco Ro Posted June 4, 2018 Share Posted June 4, 2018 Hi @wbmnfktr, Thank you for the web tool it's great. I have made the json-dl file and this work well, I can see a reach snipper with valuation, price, availability. There are all the info I put except for the photo. I use the same code I use in the header page->image_card and in the header work well that give me the correct url. But in the schema give me a different url, this one: \/site\/assets\/files\/1059\/nome.jpg . I don't know why, the description work well: $page->Description. Maybe the problem isn't here. How I can show also the photo of the product? Thank you! Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 4, 2018 Share Posted June 4, 2018 Are you using a module or a self-generated JSON-LD snippet? Where do you see the result (Google Testing, Browser extension, ...)? It shouldn't matter but you want to use httpUrl for JSON-LD. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now