Reputation: 1
I've added Hotel Reservation Markup to a transactional emails in SFMC to display general reservation data at the top of the email for recipients. Referencing this article: https://developers.google.com/gmail/markup/reference/hotel-reservation#microdata. With added script, the email successfully lands in my inbox and I can see that code is in the email code with correct dynamically populated data however google does not not seem to be processing this script as expected to be displayed at the top of the email upon opening in the inbox.
I wrapped SSJS tags in ampscript Added type="application/ld+json" Added variables that are set within the email also ensured I'm using the correctly formatted dates Sent test email to myself
What am I missing? Thanks!
%%[
SET @ScriptOpen = Concat('<', 'script',' type="application/ld+json">')
SET @ScriptClose = Concat('<','/','script','>')
]%%
%%=TreatAsContent(@ScriptOpen)=%%
{
"@context": "http://schema.org",
"@type": "LodgingReservation",
"reservationNumber": "%%=v(@ReservationNumber)=%%",
"reservationStatus": "%%=v(@reservation_Status)=%%",
"underName": {
"@type": "Person",
"name": "%%=v(@contact_Name)=%%"
},
"reservationFor": {
"@type": "LodgingBusiness",
"name": "%%=v(@ListingID)=%%",
"address": {
"@type": "PostalAddress",
"streetAddress": "%%=v(@streetAddress)=%%",
"addressLocality": "%%=v(@city)=%%",
"addressRegion": "%%=v(@stateShort)=%%",
"postalCode": "%%=v(@Zip)=%%",
"addressCountry": "%%=v(@Country_Short)=%%"
},
"telephone": "%%=v(@Guest_Contact_Phone)=%%"
},
"checkinDate": "%%=formatdate(@checkindate,'ISO')=%%",
"checkoutDate": "%%=formatdate(@checkoutdate,'ISO')=%%"
}
%%=TreatAsContent(@ScriptClose)=%%
Upvotes: 0
Views: 40
Reputation: 1
I believe you need to register with google in addition to actually adding the markup script: https://docs.google.com/forms/d/e/1FAIpQLSfT5F1VJXtBjGw2mLxY2aX557ctPTsCrJpURiKJjYeVrugHBQ/viewform?pli=1
Upvotes: 0