Google AMP (Accelerated Mobile Pages) is a proprietary Google technology built to speed up mobile apps and websites. AMP for Email is an extension and adaptation of the AMP technology that enables interactivity for Gmail recipients' email messages including carousels, expanding accordions, dynamically updating content, and more. For more information on Google's AMP specification for email, best practices, and how to register to use AMP see Google's AMP documentation.
SendGrid v3 API supports Google AMP for Email. You cannot send AMP content in SendGrid v2 API. Users can send AMP via SMTP however we strongly suggest sending it through V3.
SendGrid v3 API supports the AMP MIME part as well as the ordering recommended by Google to ensure compatibility across different mail clients. We recommend following Google's documentation to send AMP messages through SendGrid.
Open and click metrics for AMP will be aggregated with html open and click metrics in the SendGrid UI, but the AMP events are uniquely identified when collected via the Event Webhook.
Open event tracking for AMP is identified by a JSON field called sg_content_type
and will be amp
instead of html
.
1{2"email": "john.smith@sendgrid.com",3"event": "open",4"ip": "66.249.84.159",5"sg_event_id": "zgAjGPn1TGmO62eSqw9VBQ",6"sg_message_id": "zT-FDCibS4uwaz08cIX8_Q.filter0794p1las1-20361-5CCC528C-16.0",7"sg_content_type": "amp",8"timestamp": 1556901948,9"useragent": "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)"10}
Click event tracking for AMP is identified byurl_offset.type
is amp
.
1{2"email": "john.smith@sendgrid.com",3"event": "click",4"ip": "12.34.56.789",5"sg_event_id": "fmip8TM8RWqJjT44cL5z-w",6"sg_message_id": "zT-FDCibS4uwaz08cIX8_Q.filter0794p1las1-20361-5CCC528C-167"timestamp": 1556901957,8"url": "http://google.com/",9"url_offset": {10"index": 0,11"type": "amp"12},13"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36"14}
Google requires all images to use HTTPS, which will require you to enable SSL tracking on your SendGrid account in order to track opens.