Gmail Promotions Folder Annotation

Hello,
I am attempting to implement this Promotions tab feature for Gmail as detailed here: Annotate emails in the Promotions tab  |  Gmail  |  Google for Developers
Using the Design Manager, I created an email with the required code:
<head>
<div itemscope itemtype=“http://schema.org/DiscountOffer”>
<meta itemprop=“description” content=“20% OFF”/>
<meta itemprop=“discountCode” content=“SAVE20”/>
</div>
</head>

However, on output, the div is removed from the head tag and placed in the body tag.

Is there a way to prevent this from happening or work around this? We believe this is preventing us from implementing this feature in our emails.

Hi, @nrivera8108 :waving_hand: Thanks for your question. The sanitization and relocation of your div to the body is the expected behaviour here.

Have you tried using the <script type="application/ld+json"> approach as outlined in the Google dev doc you linked to? Something like:

<head>
 <script type="application/ld+json">
 [{
 "@context": "http://schema.org/",
 "@type": "DiscountOffer",
 "description": "20% OFF",
 "discountCode": "SAVE20",
 "availabilityStarts": "2023-09-25T18:44:37-07:00",
 "availabilityEnds": "2023-10-25T18:44:37-07:00"
 }]
 </script>
</head>

I used ISO 8601 format for the date stamps, as noted in the documentation.

Have fun building! — Jaycee

Hi Jaycee! I followed the HTML listed in the google developers doc but I still don’t see it show up in my test send. Any idea on what could be wrong?

@Jaycee_Lewis thank you for this response. I too am having trouble implementing this in my emails. I did put in the json code above. However, I put it right under the <head> (see image) and I cannot get this to work as planned either. Any advice? Do I need a double <head>PLUS SCRIPT</head>?