Im trying to add gmail markups to the top of the order confirmation email like showed in the picture
I tried using the gmail provided markup code:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Order",
"merchant": {
"#type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "29.99",
"acceptedOffer": {
"#type": "Offer",
"itemOffered": {
"#type": "Product",
"name": "Google Chromecast"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"#type": "QuantitativeValue",
"value": "1"
}
}
}
</script>
But with no luck.
Im using a docker with magento 2 and mailhog (locally). Mailhog recieves the order mail. The script exists in the <head> part (with inspect element) but does not get rendeded.
Also tried to sned that exact code using gmail.com to myself - it does not get rendered either.
What im missing?
Related
I've been trying to figure out a way to add how many likes were received to a product using structured data. Is what I have below correct? Or would the second example be more correct?
Is my usage of ["Product","InteractionCounter"] for the type correct in the first example?
I'm trying to have the google show a likes counter much like the aggregateRating property of Product.
I'm also not sure what the url in offers is supposed to point to or if it's necessary. Any ideas?
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://example.com/index.php?page=gallery"
},
"userInteractionCount": 55
}
</script>
OR
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Product",
"name": "CC-1",
"description": "Wedding Cake",
"additionalProperty": {
"#type": "PropertyValue",
"name": "Likes",
"description": "Likes Received",
"value": 55
}
}
</script>
This is what I have right now:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake with bla bla bla",
"category": "Wedding Cakes",
"brand": {
"#type": "Brand",
"logo": "https://example.com/images/logo.png",
"slogan": "Cakes Are Nice"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "CAD",
"price": "119.99"
},
"image": "https://example.com/collection/wedding_cakes/mid_def/CC-1",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://mimozas.com/index.php?page=gallery"
},
"userInteractionCount": "55 PLACEHOLDER"
}
If the product is the subject of content, then it makes sense to indicate likes as part of the type Product. My suggestion for you:
{"#context":"https://schema.org",
"#type":"Product",
"name":"CC-1",
"description":"Wedding Cake",
"subjectOf":{
"#type": "InteractionCounter",
"interactionType":{
"#type":"LikeAction",
"name":"Likes",
"description":"Likes Received"
},
"interactionService":{
"#type":"WebSite",
"url":"https://example.com/index.php?page=gallery"
},
"userInteractionCount":"55"
}
}
And be careful about inverted commas.
My addition after expanding the question.
I'm trying to have the google show a likes counter much like the
aggregateRating property of Product.
Google has no direct support for the type InteractionCounter - read more Explore the search gallery. However, in the rich test results of my suggestion, there are no errors or warning messages from Google:
Probably needs experimentation.
I am trying to test gmail event registration email mark up from google dev docs, But it is not adding any event on google calendar.
For testing I am using google app script. I am using my personal gmail ID which contain #gmail.com
Following is the script tag which is validated by Email Markup Tester
<!DOCTYPE html>
<html>
<head>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2027-03-06T19:30:00-08:00",
"performer": {
"#type": "Organization",
"name": "The Foo Fighters",
"image": "http://www.amprocktv.com/wp-content/uploads/2027/01/foo-fighters-1-680x383.jpg"
},
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"modifiedTime": "2027-05-01T08:00:00-08:00",
"modifyReservationUrl": "http://united.com/modifyreservation.html"
}
</script>
</head>
<body>
<p>Event Reservation Example</p>
</body>
</html>
Please help me to find out where I am making mistake or is there any issue with schema mark up.
Or Do I need to register with google while I am using google app script.
I have been adding rich snippets to my ecommerce store, and for the most part I have had no problems. For some reason when I go to add in the "brand" that is recommeneded by Google and Google Merchant services I have problems.
I have added this under: http://schema.org/Offer. And by adding it in the script in my header also with no luck.
<script type="application/ld+json" data-resource-group="head_tag" data-resource-code="organization_schema">{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress",
"addressLocality": "",
"addressRegion": "",
"addressCountry": "",
"postalCode": "",
"streetAddress": ""
},
"email": "customerservice#domain.com",
"name": "Comany namee",
"telephone": "company number"
},
"brand":{
"#type":"Thing",
"name":"[manufacture_name]"
},
</script>
<meta itemprop="brand" content="[manufacturer_name]" />
"brand":{
"#type":"Thing",
"name":"[manufacture_name]"
},
The second one just simply isn't detected for some reason.
I have code similar to the meta tag throughout the documnet so I would prefer to keep with that format if possible.
Your JSON-LD has syntax errors:
The Organization is closed with },, but the brand property appears after it.
A closing } is missing.
There should be no , after the last }.
So it would be:
{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress"
},
"name": "company name",
"brand": {
"#type": "Brand",
"name": "manufacturer name"
}
}
(Note that I used Brand instead of Thing.)
I was wondering how to achieve same email structure as PayPal has.
It looks like this (in Google's Inbox):
But I can't find right type for it here: https://developers.google.com/gmail/markup/reference/
Any idea how to achieve the PayPal-like markup?
Using schema.org/Invoice and schema.org/PayAction, I was able to get the email structure that you've posted from PayPal. It also generated a "View Bill" button, which only shows in Inbox and not Gmail. Check out my example script below. The email markup tester seemed to like it, there were no errors found. Try sending it using this Gmail Schema Tester or through Apps Script with your Gmail account.
<script type="application/ld+json">
[
{
"#context": "http://schema.org",
"#type": "Invoice",
"description": "January 2015 Acme Bill",
"url": "https://www.americanexpress.com",
"accountId": "xxxx-xxxx-xxxx-1234",
"potentialaction": {
"url": "https://example.com",
"#type": "PayAction"
},
"paymentDue": "2020-01-30",
"minimumPaymentDue": {
"#type": "PriceSpecification",
"price": "$15.00"
},
"totalPaymentDue": {
"#type": "PriceSpecification",
"price": "$200.00"
},
"paymentStatus": "payment due",
"provider": {
"#type": "Organization",
"name": "Acme Bank"
}
}
]
</script>
You should get this:
I am trying to test the triggering of a Google Now card from email and then updating the time using the modifiedTime property. Here is my markup of the initial email to trigger the initial Google Now card (It's working):
<html>
<body>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "Test Person"
},
"reservationFor": {
"#type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"#type": "Place",
"name": "Your Home",
"address": {
"#type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing"
}
</script>
<div>Test Appointment</div>
</body>
</html>
Here is the followup email I'm using to try to update the Google Now card to reflect changes in time (It has no effect):
<html>
<body>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "Test Person"
},
"reservationFor": {
"#type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"#type": "Place",
"name": "Your Home",
"address": {
"#type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing",
"modifiedTime": "2015-05-19T18:00:00-05:00"
}
</script>
<div>Test Appointment Changed</div>
</body>
</html>
Per the documentation here: https://developers.google.com/gmail/markup/reference/event-reservation#update_a_event I am reading that "You may update a event reservation simply by sending the updated event reservation and setting modifiedTime to the time of the update.", The ONLY difference between the 2 emails is the body of the email and the fact that I am including modifiedTime in the second.
Some extra background info:
1. I have validated my markup here prior to sending: https://www.google.com/webmasters/markup-tester
2. I am using the Gmail Actions sample app to send my test emails: http://gmail-actions.appspot.com/
After looking at the markup in your first email and the followup email, it looks like your startDate properties are identical (2015-05-19T16:00:00-05:00). Your follow up email should have the updated time (2015-05-19T18:00:00-05:00) in the startDate property.
If you check out the description on the documentaiton, the modifiedTime property is where you input when the reservation was last modified and not the actual updated time.