結構化資料標記可協助您定義商家代管的本地店面與到店取貨資料的屬性。新增必要的結構化資料標記,有利於 Google 審查店面產品資料的正確性。
商家代管的本地店面結構化資料
請將下表中的必要結構化資料標記新增至產品到達網頁:
注意:無論網頁是以何種程式語言撰寫,皆可使用 Schema.org 標記。標記 (如 HTML) 使用英文。Schema.org 值須區分大小寫。
Schema.org 值 | 產品或商品目錄動態饋給規格值 | 值類型 |
---|---|---|
Product > sku | itemid |
SKU 字串 |
Product > offers > price | price |
這個欄位只能包含價格的值,應填入數字,但不能含有千位數分隔符或空格 (例如「8.99」)。 |
Product > offers > priceCurrency | price (currency) |
價格幣別一律採用 ISO 4217 格式並以 3 個字母表示 (例如「USD」、「GBP」、「EUR」),且該貨幣必須符合指定國家/地區的語言與幣別規定。 |
Product > offers > availability | availability |
有效的 ItemAvailability 值。最常見的 schema.org 值為 InStock 和 OutofStock 。 |
Product > offers > itemCondition | condition |
有效的 OfferItemCondition 。最常見的 schema.org 值是 NewCondition 和 UsedCondition 。 |
Product > offers > availableAtOrFrom > branchCode | store code |
每間本地商店都要有一組以英數字元組成的專屬 ID。使用的商店代碼必須與您在商家檔案提供的代碼相同。 |
到店取貨結構化資料
如要在 Google.com 針對連往到店取貨到達網頁的商品顯示到店取貨註解,請加入以下值:
注意:無論網頁是以何種程式語言撰寫,皆可使用 Schema.org 標記。標記 (如 HTML) 使用英文。Schema.org 值須區分大小寫。
schema.org 資源 |
產品或商品目錄動態饋給規格值 |
值類型 |
---|---|---|
Product > sku | item id [ID] |
SKU 字串 |
Product > offers > price | price [價格] |
這個欄位只能包含價格的值,應填入數字,但不能含有千位數分隔符或空格 (例如「8.99」)。 |
Product > offers > priceCurrency | price [價格] (currency [幣別]) |
價格幣別一律採用 ISO 4217 格式並以 3 個字母表示 (例如「USD」、「GBP」、「EUR」),且該貨幣必須符合指定國家/地區的語言與幣別規定。 |
Product > offers > availability | availability [供應情形] |
有效的 |
Product > offers > itemCondition | condition [狀況] |
有效的 |
Product > offers > availableAtOrFrom > branchCode | store code [商店代碼] |
每間本地商店都要有一組以英數字元組成的專屬 ID。商店代碼 [store_code] 屬性的值必須與您在商家檔案提供的代碼一致。 |
Product > offers > availableDeliveryMethod |
-- |
OnSitePickup 這個 schema.org 值代表產品可以到店取貨。 |
Product > offers > potentialAction | pickup_method [取貨方式] |
BuyAction 這個 schema.org 值代表客戶可以在線上購買產品,然後再到店取貨。ReserveAction schema.org 值則代表客戶可在線上預訂產品,然後再到店取貨。 |
Product > offers > deliveryLeadTime | pickup sla [取貨服務水準協議] |
交貨前置時間的值只能設為 1 或 0。這項資訊是用來表示客戶預計應等待幾天才能取貨,值的定義如下: 0 = 當天取貨 1 = 次日取貨 |
測試標記
您可以使用複合式搜尋結果工具測試 Schema.org 的導入情形。如要進一步瞭解如何使用這項工具、排除錯誤,以及判讀執行這項工具後產生的結果,請參閱複合式搜尋結果測試說明文章。結構化資料標記的規定
- 結構化資料標記必須出現在網站伺服器傳回的 HTML 中。一旦載入網頁後,就無法透過 JavaScript 產生結構化資料標記。
- 到達網頁無法根據使用者的相關資訊變更內容,例如無法根據使用者的 IP 位址或瀏覽器類型自動調整價格。
- 結構化資料必須和使用者看到的值相同。在產品到達網頁上提供不正確的資料,將違反網頁程式開發人員指南的規定。
範例
微資料範例
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="sku" content="123456"/>
<meta itemprop="name" content="Acme 白色 17 吋微波爐"/>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <!-- Online offer -->
<span itemprop="price" content="55.00"/>
<meta itemprop="priceCurrency" content="USD"/>
<link itemprop="availability" href="http://schema.org/InStock"/>
<link itemprop="itemCondition" href="http://schema.org/NewCondition"/>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <!-- Local offer -->
<span itemprop="price" content="55.00"/>
<meta itemprop="priceCurrency" content="USD"/>
<link itemprop="availability" href="http://schema.org/InStock"/>
<link itemprop="itemCondition" href="http://schema.org/NewCondition"/>
<div itemprop="availableAtOrFrom" itemscope itemtype="http://schema.org/Place">
<span itemprop="name" content="Acme 商店名稱"/>
<span itemprop="branchCode" content="12345"/>
</div>
<link itemprop="availableDeliveryMethod" href="http://schema.org/OnSitePickup"/>
<link itemprop="potentialAction" itemscope itemtype="http://schema.org/BuyAction"/>
<div itemprop="deliveryLeadTime" itemscope itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value" content="0"/>
</div>
</div>
</div>
JSON-LD 範例
{
"@context": "http://schema.org/",
"@type": "Product",
"sku": "123456",
"name": "Acme 白色 17 吋微波爐",
"offers": [{
"@type": "Offer",
"price": "55.00",
"priceCurrency": "USD",
"availability": "http://schema.org/InStock",
"itemCondition": "http://schema.org/NewCondition"
}, {
"@type": "Offer",
"price": "55.00",
"priceCurrency": "USD",
"availability": "http://schema.org/InStock",
"itemCondition": "http://schema.org/NewCondition",
"availableAtOrFrom": {
"@type": "Place",
"name": "Acme 商店名稱",
"branchCode": "12345"
},
"availableDeliveryMethod": "http://schema.org/OnSitePickup",
"potentialAction": {
"@type": "http://schema.org/BuyAction"
},
"deliveryLeadTime": {
"@type": "http://schema.org/QuantitativeValue",
"value": 0
}
}]
}