大网数据广告活动
网站运营与故障问答

Structured data for website that shows tours from many operators

· 52CE 我爱测

I have a website that lists tours from many different tour operators. Each tour page has pricing, location, ratings and reviews, and may or may not have tour dates (some tours run every day, some run on demand, some run on specif…

问题原文

原帖链接 · johna · CC BY-SA 3.0

I have a website that lists tours from many different tour operators. Each tour page has pricing, location, ratings and reviews, and may or may not have tour dates (some tours run every day, some run on demand, some run on specific dates).

There doesn't seem to be a correct schema.org schema for this. Event or SaleEvent seem to be good choices but StartDate is a required field. Then there is Product and Service which might be the right choice.

I am wondering how best to mark this up for best ranking by search engines, local search (by tour location), and rich snippets?

已采纳解答

原帖链接 · inkovic · CC BY-SA 3.0

Here's how you would do this:

Have a wrapper for https://schema.org/ProfessionalService for the Tour Guide Company.

Because ProfessionalService is a child of LocalBusiness, you can inherit all of the relevant business properties details or simply use mainEntityOfPage to reference the Tour Company page on your website.

Then, use the makesOffer item property - the expected type for this is an Offer found at https://schema.org/Offer.

Each offer would contain your pricing, location, ratings and reviews. Here is the list:

  • Pricing: The price item property of itemtype Offer. The expected type is either plain text or number.
  • Location: The availableAtOrFrom item property of itemtype Offer. The expected itemtype is Place, meaning you can use any of it's children such as LocalBusiness or even grandchildren like ProfessionalService.*
  • Reviews and Ratings: The review item property of itemtype Review. Straight forward, the reviewRating item property of Review will be used for reviews. reviewRating is of Rating itemtype, use the child aggregatedRating for a collation of reviews.
  • Dates and Flexibility: availabilityStarts and availabilityEnds cover you for this one. These both return the DateTime - this is where the flixibility of time comes in. DateTime contains a whole lot of properties, including availabilityStarts and availabilityEnds - which can be either a Demand or an Offer. **

Some other notes:

  • https://schema.org/AggregateOffer is a child of Offer and can be used to replace the expected itemtype of Offer for the makesOffer item property of ProfessionalService. This can be useful if you have different versions of tours (such as a premium package) or if you have a list view page containing all tours from a single company.

You can also inverse this, by having a AggregatedOffer for just the location, and list all of the ProfessionalServices and their Offers if multiple Tour Companies work at the same location and the same date etc.

As a general tip, pay attention to the expected type column on schema.org to figure out how best to tackle a problem.

The LocalBusiness + children being used with Offer is a very common data design pattern and would probably be one of most use in practical rich snippet design.

You can also use additionalType to marry two or more Schema Item Types.

* Notice an inception theme? Good. This can be used to create a recursive schema, meaning that you can have an offer within an offer. Pay attention to expected types to see if you can jump back up the hierarchy and find an appropriate child item type if you are ever in a jam. ** Notice that this can also create a recursive schema, so you can have and offer within an offer.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2015-09-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。