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

schema.org markup for voucher codes

· 52CE 我爱测

I'd like to start using schema.org markup. At the moment I'm trying to mark up voucher codes but I'm a bit lost. I have seen one website that is showing voucher codes as offers: <div itemprop="offers" itemtype="https://schema.org…

问题原文

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

I'd like to start using schema.org markup. At the moment I'm trying to mark up voucher codes but I'm a bit lost. I have seen one website that is showing voucher codes as offers:

<div itemprop="offers" itemtype="https://schema.org/Offer">
    <meta itemprop="price" content="40.0%" />
    <link itemprop="availability" href="https://schema.org/InStock" />
    ...
</div>

This approach seems very wrong. How can a coupon code be in stock? And the price can't be forty percent. Funny that this particular website is ranking very well.

But what is the correct way? I can't find a proper item type for this purpose.

已采纳解答

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

discount only applies to Order, which is for completed transactions. Thus there's no real schema designed specifically for separate discount codes.

Offer seems to be the closest and most appropriate schema for this as you are offering a voucher code. Voucher codes can be available or unavailable, with LimitedAvailability and an end date set with availabilityEnds. For price, you can set priceSpecification.

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

资料来源与适用范围

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

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

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