I'm added a tracking link to New Shipment Email which will take customer to order tracking url. But I now have a requirement to utilize the Google's goto action for this purpose, so that customer could straight away goto the order tracking url without openeing the email.
How could I add the JavaScript
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ParcelDelivery",
"deliveryAddress": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"addressCountry": "US",
"postalCode": "94107"
},
"expectedArrivalUntil": "2013-03-12T12:00:00-08:00",
"carrier": {
"@type": "Organization",
"name": "FedEx"
},
"itemShipped": {
"@type": "Product",
"name": "iPod Mini"
},
"partOfOrder": {
"@type": "Order",
"orderNumber": "176057",
"merchant": {
"@type": "Organization",
"name": "Bob Dole"
}
},
"trackingUrl": "http://www.my-site.in/ordertracker/"
}
</script>
or Microdata
<div itemscope itemtype="http://schema.org/ParcelDelivery">
<div itemprop="deliveryAddress" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="streetAddress" content="24 Willie Mays Plaza"/>
<meta itemprop="addressLocality" content="San Francisco"/>
<meta itemprop="addressRegion" content="CA"/>
<meta itemprop="addressCountry" content="US"/>
<meta itemprop="postalCode" content="94107"/>
</div>
<meta itemprop="expectedArrivalUntil" content="2013-03-12T12:00:00-08:00"/>
<div itemprop="carrier" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="FedEx"/>
</div>
<div itemprop="itemShipped" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="iPod Mini"/>
</div>
<div itemprop="partOfOrder" itemscope itemtype="http://schema.org/Order">
<meta itemprop="orderNumber" content="176057"/>
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Bob Dole"/>
</div>
</div>
<link itemprop="trackingUrl" href="http://www.my-site.in/ordertracker/"/>
</div>
I deployed it using google app script with my own email (sender and receiver), it works fine
note:
I am aware the sender email should be authenticated by SPF/DKIM
I use my own gmail Id as sender (configured it with XAMPP (localhost))
receiver is the same gmail id.