在產品到達網頁上使用結構化資料標記,Google 就可以直接從您的網站擷取產品和優惠活動的最新資訊。凡是 Merchant Center 支援的結構化資料標記,都會有對應的屬性和接受值 (可使用的值),詳情請參考產品資料規格。結構化資料須與對應的值和屬性相符。
本頁內容
屬性和 schema.org 註解
對於您提交的產品資料,Merchant Center 有很多種整理方式,屬性就是其中之一。每個屬性都包含產品相關的單項資訊,例如產品的名稱或說明。正確配對 schema.org 的值和相對應的產品資料規格屬性,可減少動態饋給驗證過程中的錯誤。
注意:如果採用商品自動更新功能,請務必指定 schema.org 資源「price」、「priceCurrency」、「availability」和「condition」,提高資訊準確度。進一步瞭解如何允許 Merchant Center 自動更新產品資訊。
|
產品資料屬性 schema.org 資源 |
類型與說明 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
以下資源來自 schema.org 的 Product 類型。 |
|||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
| 網址 | |||||||||||||||||||||||||||||
|
文字 上層 SKU。如要將同一產品群組的所有子類產品歸為一組,此為必要屬性。 |
|||||||||||||||||||||||||||||
|
文字 每項產品都有專屬的全球交易品項識別碼。 只能指定其中一種 schema.org 資源。 使用時請注意,全球交易品項識別碼值須為正確長度,且包含正確的檢查碼。 |
|||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
|
文字 |
|||||||||||||||||||||||||||||
|
文字 使用
|
|||||||||||||||||||||||||||||
|
以及 |
數字 (以歲為單位) 使用 有效值為
|
||||||||||||||||||||||||||||
| 文字 | |||||||||||||||||||||||||||||
|
或 |
文字 使用 |
||||||||||||||||||||||||||||
|
文字 使用 有效值來自
|
|||||||||||||||||||||||||||||
|
文字 使用 有效值來自 WearableSizeSystemEnumeration 類型,這些資料值和動態饋給值的對應如下:
|
|||||||||||||||||||||||||||||
|
使用 |
|||||||||||||||||||||||||||||
|
使用 |
|||||||||||||||||||||||||||||
|
使用 |
|||||||||||||||||||||||||||||
|
使用 |
|||||||||||||||||||||||||||||
|
以下 schema.org 資源來自 Offer 類型,該類型須依巢狀結構列在 |
|||||||||||||||||||||||||||||
| 產品的有效網址。 | |||||||||||||||||||||||||||||
|
或: |
price:數字。不得包含貨幣符號、千位分隔符號或空格 (例如「1498.99」)。 priceCurrency:文字。須採用 ISO 4217 格式並以 3 個英文字母表示 (例如 USD、GBP、EUR),且貨幣應符合指定國家/地區的語言和貨幣規定。 注意:price 和 priceCurrency 值可直接在 Offer 執行個體提供,或是透過 UnitPriceSpecification 類型的 priceSpecification 資源間接提供。 如已指定 sale_price,請務必透過 priceSpecification 資源提供 price,並設定 priceSpecification.priceType="StrikethroughPrice"。 sale_price 值可直接在 Offer 指定,或是透過 UnitPriceSpecification 類型的 priceSpecification 資源指定 (不必使用 priceSpecification.priceType)。 |
||||||||||||||||||||||||||||
|
有效值來自
|
|||||||||||||||||||||||||||||
|
有效值來自
|
|||||||||||||||||||||||||||||
| 產品的有效結帳頁面網址。 | |||||||||||||||||||||||||||||
採用 JSON-LD 的示例
單一產品
範例
下方例子示範基本的產品屬性。
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"gtin": "12345678901234",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"price": 39.99,
"priceCurrency": "USD"
}
}
下方例子示範如何使用 schema.org 指定尺寸類型和尺寸系統。這個例子指定藍色 T 恤為美國尺寸系統「XL」,適合成人 (13 歲以上年齡層),且屬於「高大」(Big&Tall) 男性時裝類別。
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "12345",
"image": "https://www.example.com/tshirt.jpg",
"name": "Classic T-Shirt",
"description": "All-cotton t-shirt in classic cut",
"gtin": "12345678901234",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"material": "cotton",
"color": "blue",
"size": {
"@type": "SizeSpecification",
"name": "XL",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": [
"https://schema.org/WearableSizeGroupBig",
"https://schema.org/WearableSizeGroupTall"
]
},
"audience": {
"@type": "PeopleAudience",
"suggestedGender": "male",
"suggestedMinAge": 13
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/tshirt",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"price": 24.99,
"priceCurrency": "USD"
}
}
同一個到達網頁有多項不相關的產品
如果網頁上有多項不相關的產品,且每項產品有各自的結構化資料註解,則每個註解都須包含對應產品的識別資訊。
舉例來說,我們建議在每個註解中都提供 SKU (ID [id] 屬性) 或全球交易品項識別碼 ([gtin] 屬性)。如未提供這些資訊,到達網頁上的產品可能無法與結構化產品資料正確對應。進一步瞭解如何設定到達網頁的結構化資料。
範例
[
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"gtin": "12345678901234",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"price": 39.99,
"priceCurrency": "USD"
}
},
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "racket-12345",
"image": "https://www.example.com/racket.jpg",
"name": "Nice racket",
"description": "Racket for Tennis",
"gtin": "12345678901235",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/racket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"price": 59.99,
"priceCurrency": "USD"
}
}
]大量價格
為產品套用大量價格時,建議直接在結構化資料註解中加入優惠總價。以下範例說明,如果最低銷售量為 3 個單位,每單位售價為 $2 美元,則總價為 $6 美元 (最低可購買數量的總價):
範例
{
"offers": {
"@type": "Offer",
"url": "https://www.example.com/Product/Detail/S-123",
"availability": "http://schema.org/InStock",
"priceCurrency": "USD",
"price": "6.00"
}
}
特價
下方例子示範有特價的基本產品。如要標示特價,須同時使用 /priceType 資源指定原始定價。
範例
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"gtin": "12345678901234",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"price": 10.00,
"priceCurrency": "USD",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"priceType": "https://schema.org/StrikethroughPrice",
"price": 15.00,
"priceCurrency": "USD"
}
}
}
If a /UnitPriceSpecification is also used for the non sale-price, the encoding simply contains two /UnitPriceSpecifications:
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"gtin": "12345678901234",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"priceSpecification": [
{
"@type": "UnitPriceSpecification",
"price": 10.00,
"priceCurrency": "USD"
},
{
"@type": "UnitPriceSpecification",
"priceType": "https://schema.org/StrikethroughPrice",
"price": 15.00,
"priceCurrency": "USD"
}
]
}
}
會員價
下方例子示範會員價的編碼方式。如要標示會員價,請在結構化資料中使用 validForMemberTier。
[loyalty_program] 屬性。進一步瞭解會員方案。範例
第一例是在優惠層級用 price 資源指定現行價格,並在標有 validForMemberTier 資源的價格規格中提供會員價:
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"price": 10.00,
"priceCurrency": "GBP",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"price": 8.00,
"priceCurrency": "GBP",
"validForMemberTier": {
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_gold"
}
}
}
在第二例中,現行價格和會員價均以價格規格編碼:
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"priceSpecification": [
{
"@type": "UnitPriceSpecification",
"price": 10.00,
"priceCurrency": "GBP"
},
{
"@type": "UnitPriceSpecification",
"price": 8.00,
"priceCurrency": "GBP",
"validForMemberTier": {
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_gold"
}
}
]
}
第三例示範如何在單一優惠中,對特價、原價和多個會員方案等級的會員價進行編碼:
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"priceSpecification": [
{
"@type": "UnitPriceSpecification",
"price": 9.00,
"priceCurrency": "GBP"
},
{
"@type": "UnitPriceSpecification",
"priceType": "https://schema.org/StrikethroughPrice",
"price": 10.00,
"priceCurrency": "GBP"
},
{
"@type": "UnitPriceSpecification",
"price": 8.00,
"priceCurrency": "GBP",
"validForMemberTier": {
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_silver"
}
},
{
"@type": "UnitPriceSpecification",
"price": 7.00,
"priceCurrency": "GBP",
"validForMemberTier": [
{
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_gold"
},
{
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_platinum"
}
]
}
]
}
在第四例中,會員價規格顯示會員點數,而非會員價:
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"price": 10.00,
"priceCurrency": "GBP",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"membershipPointsEarned": 20,
"validForMemberTier": {
"@type": "MemberProgramTier",
"@id": "https://www.example.com/com/members#tier_gold"
}
}
}
運送/運費
如要指定產品的運費 (建議做法),請使用 schema.org 的 OfferShippingDetails 類型,該類型須依巢狀結構列在 Offer 之下,並以 shippingDetails 資源為容器,且應對應產品資料規格中的 shipping 屬性。您可以提供多個 shippingDetails 資源。
|
產品資料屬性 schema.org 資源 |
類型與說明 |
|---|---|
以下屬性來自 schema.org 的 OfferShippingDetails 類型。 |
|
|
文字 ISO 3166-1 國家/地區代碼 (2 碼) 使用 |
|
|
文字 ISO 3166-2 子行政區代碼 (2 或 3 碼),不含國家/地區的前置字元。僅適用於美國、澳洲或日本,例如「NY」、「NSW」或「03」。 使用 |
|
|
使用 |
|
|
數字 (非負數的整數) 指定訂單的最短和最長處理時間及運送時間 (以工作天為單位)。處理時間是指從下單到出貨給貨運公司的時間;運送時間則是指出貨給貨運公司到送達消費者的時間。 使用 |
|
範例
下方例子示範如何以 schema.org 指定運送資訊。該例是針對美國的加州、內華達州和亞利桑那州,指定 3.49 美元運費。處理時間為 0 至 1 個工作天,運送時間則為 1 至 5 個工作天不等。
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"gtin": "12345678901234",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"price": 39.99,
"priceCurrency": "USD"
},
"shippingDetails": {
"@type": "OfferShippingDetails",
"shippingDestination": {
"@type": "DefinedRegion",
"addressCountry": "US",
"addressRegion": [ "CA", "NV", "AZ" ]
},
"shippingRate": {
"@type": "MonetaryAmount",
"value": 3.49,
"currency": "USD"
},
"deliveryTime": {
"@type": "ShippingDeliveryTime",
"handlingTime": {
"@type": "QuantitativeValue",
"minValue": 0,
"maxValue": 1,
"unitCode": "DAY"
},
"transitTime": {
"@type": "QuantitativeValue",
"minValue": 1,
"maxValue": 5,
"unitCode": "DAY"
}
}
}
}
}
退貨
如要指定退貨期限和產品費用,請使用 Schema.org 的MerchantReturnPolicy 類型,該類型須依巢狀結構列在 Offer 類型之下,並以 hasMerchantReturnPolicy 資源為容器。
雖然 MerchantReturnPolicy 僅適用於經檢索取得的商品,且產品資料規格中並無對應屬性,但如果是手動上傳商品目錄,則必須在產品動態饋給中使用退貨政策標籤 [return_policy_label] 屬性。瞭解如何設定退貨政策標籤 [return_policy_label] 屬性。
|
schema.org 資源 |
類型與說明 |
|---|---|
| 以下 schema.org 資源來自 MerchantReturnPolicy 類型,該類型須依巢狀結構列在 Product 之下,並以 offers 資源為容器 (請參閱下方例子)。 | |
| applicableCountry |
文字 兩位字母的 ISO 3166-1 alpha-2 國家/地區代碼 (例如「US」) 三位字母的 ISO 3166-1 alpha-3 國家/地區代碼 (例如「USA」) 特定商家退貨政策適用的國家/地區,可與產品的出貨國家/地區不同。最多能指定 50 個國家/地區。 |
|
有效值來自 MerchantReturnEnumeration 類型:
指定為 MerchantReturnFiniteReturnWindow 或 MerchantReturnUnlimitedWindow 時,建議使用 returnMethod 和 returnShippingFeesAmount。此外,如果指定為 MerchantReturnFiniteReturnWindow,則須使用 merchantReturnDays。 |
|
| merchantReturnDays |
產品退貨期限的天數 (從送達日期起算)。 |
| returnMethod |
有效值來自 ReturnMethodEnumeration 類型:
|
| returnFees | 有效值為 ReturnFeesEnumeration 類型的 FreeReturn。 |
| returnShippingFeesAmount |
退回產品的運費資訊。 |
範例
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "trinket-12345",
"gtin": "12345678901234",
"image": "https://www.example.com/trinket.jpg",
"name": "Nice trinket",
"description": "Trinket with clean lines",
"brand": {
"@type": "Brand",
"name": "MyBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/trinket_offer",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"price": 39.99,
"priceCurrency": "USD"
},
"shippingDetails": {
"@type": "OfferShippingDetails",
"shippingRate": {
"@type": "MonetaryAmount",
"value": 2.99,
"currency": "USD"
},
"shippingDestination": {
"@type": "DefinedRegion",
"addressCountry": "US"
},
"deliveryTime": {
"@type": "ShippingDeliveryTime",
"handlingTime": {
"@type": "QuantitativeValue",
"minValue": 0,
"maxValue": 1,
"unitCode": "DAY"
},
"transitTime": {
"@type": "QuantitativeValue",
"minValue": 1,
"maxValue": 5,
"unitCode": "DAY"
}
}
},
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"applicableCountry": "US",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"merchantReturnDays": 60,
"returnMethod": "https://schema.org/ReturnByMail",
"returnFees": "https://schema.org/FreeReturn"
}
}
}
能源效率
Schema.org 支援使用 EnergyConsumptionDetails 類型為產品標示能源效率,並可針對使用 hasEnergyConsumptionDetails 資源的產品進行指定。
|
產品資料屬性
|
類型與說明 |
|---|---|
以下 schema.org 資源來自 EnergyConsumptionDetails 類型。 |
|
|
有效值來自 schema.org 的 |
|
在 EnergyConsumptionDetails 資料類型中指定。此值是根據 energy_efficiency_class 屬性的標準對應表所決定。若提供 energy_efficiency_class 但省略此值,則會預設為 EUEnergyEfficiencyCategoryG。 |
|
在 EnergyConsumptionDetails 資料類型中指定。此值是根據 energy_efficiency_class 屬性的標準對應表所決定。若提供 energy_efficiency_class 但省略此值,則會預設為 EUEnergyEfficiencyCategoryA3Plus。 |
|
energyEfficiencyScale、energyEfficiencyScaleMin 和 energyEfficiencyScaleMax 的值來自 schema.org 的 EUEnergyEfficiencyEnumeration 列舉類型,並對應至產品資料規格中的 3 個能源效率屬性值,如下所示。
範例
下方例子示範如何以 schema.org 指定能源效率資訊。該例將歐盟能源效率等級指定為「C」,且熱水器的範圍為「A+」至「F」。
{ "@context": "https://schema.org/", "@type": "Product", "sku": "1234-5678", "image": "https://www.example.com/waterheater.jpg", "name": "Water heater", "description": "Large capacity water heater", "gtin": "12345678901231", "mpn": "WH1234", "brand": { "@type": "Brand", "name": "ExampleWaterHeaterBrand" },
"hasEnergyConsumptionDetails": {
"hasEnergyEffiencyCategory": "https://schema.org/EUEnergyEfficiencyCategoryC",
"energyEffiencyScaleMax":
"https://schema.org/EUEnergyEfficiencyCategoryA1Plus",
"energyEffiencyScaleMin": "https://schema.org/EUEnergyEfficiencyCategoryF"
}, "offers": { "@type": "Offer", "url": "https://www.example.com/hotwaterheater", "itemCondition": "https://schema.org/NewCondition", "availability": "https://schema.org/InStock", "price": 1799.00, "priceCurrency": "EUR" }}單價
schema.org 支援以 UnitPriceSpecification 類型下的 referenceQuantity 資源,指定產品計價單位,然後使用 priceSpecification 資源附加至 Offer。指定計價單位時,請一併使用 priceSpecification 資源指定產品價格和幣別 (而不是直接用 Offer 的 price 和 priceCurrency 資源)。
|
產品資料屬性 schema.org 資源 |
類型與說明 |
以下 schema.org 資源來自 UnitPriceSpecification 類型。 |
|
|
在用於指定優惠價格的 使用 |
|
|
在用於指定計價單位 使用 |
|
範例
下方例子示範一袋 5 公斤的米價格為 3.99 歐元,並以每公斤價格為首選標準價格。因此,向消費者顯示的產品價格可能會是每公斤 0.80 歐元。
{
"@context": "https://schema.org/",
"@type": "Product",
"sku": "basrice12345",
"image": "https://www.example.com/rice.jpg",
"name": "Basmati rice",
"description": "Large bag of Organic Basmati white rice, 5 Kilogram",
"gtin": "12345678901231",
"brand": {
"@type": "Brand",
"name": "ExampleRiceBrand"
},
"offers": {
"@type": "Offer",
"url": "https://www.example.com/basrice1kg",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"price": 3.99,
"priceCurrency": "EUR",
"referenceQuantity": {
"@type": "QuantitativeValue",
"value": 5,
"unitCode": "KGM",
"valueReference": {
"value": 1,
"unitCode": "KGM"
}
}
}
}
}
測試標記
您可以使用複合式搜尋結果工具,測試 schema.org 的導入情形 (請查看「商家資訊」結構化資料的報表)。歡迎造訪 Google Search Console 說明中心,進一步瞭解如何使用這項工具、進行偵錯及判讀結果。進一步瞭解產品結構化資料。
結構化資料標記的規定
- 網路伺服器傳回的 HTML 中須包含結構化資料標記。一旦載入網頁,就無法透過 JavaScript 產生結構化資料標記。
- 到達網頁無法根據消費者的相關資訊變更內容,例如無法根據消費者的 IP 位址或瀏覽器類型自動調整價格。
- 結構化資料須與顧客看到的值相同。在產品到達網頁上顯示不正確的資料,視為違反網頁程式開發人員指南的規定。
- Google 建議使用 JSON-LD 處理結構化資料。