電子郵件註解可讓使用者在「促銷內容」分頁中瀏覽電子郵件,並使用圖片、特惠和到期日等功能,讓電子郵件更生動有趣。
為電子郵件加上註解時,Gmail 使用者會直接在收件匣中查看促銷活動並進行互動。在「促銷內容」分頁中,使用者只要按一下註解文字或圖片,就能進一步瞭解促銷活動,完全不必開啟電子郵件。
本頁面說明如何使用 JSON-LD 和微資料為電子郵件加上註解。如要進一步瞭解電子郵件標記,請參閱入門指南。如需可在電子郵件註解中使用的標記欄位清單,請參閱參考說明文件。
建構電子郵件註解
您可以為電子郵件加上註解,「促銷內容」分頁就會顯示下列功能:
以下各節將說明如何建立各種電子郵件註解。
建立交易備註
交易註解會顯示有關促銷活動的文字詳細資料,例如促銷代碼或到期日。
如要建立交易註解,請按照下列步驟操作:
- 在行銷電子郵件平台中建立電子郵件,並開啟電子郵件的 HTML 編輯器。
在
head
區段中,新增包含資料類型DiscountOffer
的script
標記:JSON-LD
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <script type="application/ld+json"> [{ "@context": "http://schema.org/", "@type": "DiscountOffer", "description": "DESCRIPTION", "discountCode": "DISCOUNT_CODE", "availabilityStarts": "START_DATE_TIME", "availabilityEnds": "END_DATE_TIME" }] </script> </head> <body> // The message of your email </body> </html>
微資料
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <div itemscope itemtype="http://schema.org/DiscountOffer"> <meta itemprop="description" content="DESCRIPTION"/> <meta itemprop="discountCode" content="DISCOUNT_CODE"/> <meta itemprop="availabilityStarts" content="START_DATE_TIME"/> <meta itemprop="availabilityEnds" content="END_DATE_TIME"/> </div> </head> <body> // The message of your email. </body> </html>
替換下列值。所有屬性皆為選用屬性。每個屬性都可以包含值,或是在程式碼中省略該屬性。
在
body
標記中,撰寫電子郵件的訊息。
建立產品輪轉介面
產品輪轉介面會顯示促銷活動的多個圖片預覽,如下所示:
您最多可在輪轉介面中加入 10 張圖片預覽,且每張圖片均不得重複。
如何建立產品輪轉介面:
- 在行銷電子郵件平台中建立電子郵件,並開啟電子郵件的 HTML 編輯器。
在
head
區段中,新增script
標記。為產品輪轉介面中的每張圖片新增PromotionCard
物件:JSON-LD
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <script type="application/ld+json"> [ // Build the first image preview in your product carousel: { "@context": "http://schema.org/", "@type": "PromotionCard", "image": "IMAGE_URL1", "url": "PROMO_URL1", // Optionally, include the following PromotionCard properties: "headline": "HEADLINE1", "price": PRICE1, "priceCurrency": "PRICE_CURRENCY1", "discountValue": DISCOUNT_VALUE1, "position": POSITION }, // Build the second image preview in your product carousel: { "@context": "http://schema.org/", "@type": "PromotionCard", "image": "IMAGE_URL2", "url": "PROMO_URL2", // Optionally, include the following PromotionCard properties: "headline": "HEADLINE2", "price": PRICE2, "priceCurrency": "PRICE_CURRENCY2", "discountValue": DISCOUNT_VALUE2, "position": POSITION } // To include more image previews, add additional PromotionCard objects. // You can include up to 10 image previews in a product carousel. ] </script> </head> <body> // The message of your email </body> </html>
微資料
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> // Build the first image preview in your product carousel: <div itemscope itemtype="http://schema.org/PromotionCard"> <meta itemprop="image" content="IMAGE_URL1"/> <meta itemprop="url" content="PROMO_URL1"/> // Optionally, include the following PromotionCard properties: <meta itemprop="headline" content="HEADLINE1"/> <meta itemprop="price" content="PRICE1"/> <meta itemprop="priceCurrency" content="PRICE_CURRENCY1"/> <meta itemprop="discountValue" content="DISCOUNT_VALUE1"/> <meta itemprop="position" content="POSITION"/> </div> // Build the second image preview in your product carousel: <div itemscope itemtype="http://schema.org/PromotionCard"> <meta itemprop="image" content="IMAGE_URL2"/> <meta itemprop="url" content="PROMO_URL2"/> // Optionally, include the following PromotionCard properties: <meta itemprop="headline" content="HEADLINE2"/> <meta itemprop="price" content="PRICE2"/> <meta itemprop="priceCurrency" content="PRICE_CURRENCY2"/> <meta itemprop="discountValue" content="DISCOUNT_VALUE2"/> <meta itemprop="position" content="POSITION"/> </div> // To include more image previews, add additional PromotionCard objects. // You can include up to 10 image previews in a product carousel. </head> <body> // The message of your email </body> </html>
針對每個
PromotionCard
物件,替換下列值。至於選用屬性,您可以加入一個值,或是在程式碼中省略該屬性。IMAGE_URL
:圖片的 PNG 或 JPEG 格式網址,例如https://www.example.com/image.png
。支援的顯示比例為 4:5、1:1、1.91:1。如果是產品輪轉介面,每張圖片都必須有專屬網址,並使用相同的顯示比例。PROMO_URL
:促銷活動的網址。當使用者在「促銷活動」分頁中點選圖片時,就會前往這個網址。HEADLINE
(選填):預覽圖片下方顯示的促銷活動說明 (1 至 2 行)。PRICE
(選填):促銷活動的價格。PRICE_CURRENCY
(選用):價格採用 3 個字母的 ISO 4217 格式,例如USD
。決定price
中顯示的貨幣符號。DISCOUNT_VALUE
(選用):從price
減去的金額,顯示調整後的價格。調整後的價格會顯示在原價旁邊。舉例來說,如果
discountValue
是25
,price
為100
,priceCurrency
為USD
,則調整後的價格會顯示為$75
。POSITION
(選用):資訊卡在輪轉介面中的位置。
在
body
標記中,撰寫電子郵件的訊息。