Marketing automation with SendGrid
I first came across SendGrid while configuring a Google Cloud Compute Engine instance. Google blocks standard SMTP ports and suggests users route mail through third-party e-mail delivery services like SendGrid. These services offset the work of maintaining IP-based e-mail reputation and provide additional tools for contact management, e-mail marketing, and compliance with CAN-SPAM requirements.
With a sleek, modern UI, well-documented web API, and helper libraries in seven languages, SendGrid stands out in this space. Though it does not bill itself as a marketing automation platform, SendGrid’s rule-based segmentation, white-label click-tracking, inbound parse webhooks, and transactional messaging -- all free -- are comparable to Bronto, Oracle’s enterprise marketing automation platform.
Just like Bronto, SendGrid supports automated segmentation, though Bronto is far more powerful in this regard. SendGrid can segment on contact fields whereas Bronto can segment on dozens of criteria ranging from contact fields to engagement history (click rate, conversion rate, etc.), geoip (city, timezone, etc.), and platform (OS, mail client, etc.) Segments are more powerful than lists because they are automatically managed: you just need to define your inclusion criteria and the platform automatically adds and removes contacts as their eligibility changes.
For instance, imagine a site with multiple sections: news, reviews, and entertainment. Now say that each of these sections has a unique newsletter associated with it and we want to trigger the newsletters programmatically (for instance, when a section has a certain amount of new content). First, we create a segment for each section and associate it with an inclusion rule. For instance, the “News Subscribers” segment could be configured to include all users whose “news_subscriber” field is set to “1”. Now when a user engages in a particular action -- say they click a subscribe button on a call to action -- we just need to set their “news_subscriber” field to “1”. Later, we just need to target the News Subscribers segment and all eligible users (those whose “news_subscriber” field is set to “1”) will receive our newsletter -- no manual list management.
Secure link branding and click-tracking
Ordinarily, e-mail click-tracking is achieved by pointing links to SendGrid’s servers, where the engagement is recorded, and then redirecting the user to the link’s ultimate destination. The user doesn’t notice this but e-mail services do, which can hurt deliverability rates. SendGrid combats this by allowing you to configure secure link branding and click-tracking. This is achieved by configuring SendGrid to use your subdomain for click-tracking and proxying the traffic back to SendGrid. Instead of pointing links to a SendGrid URL, the platform will now point links to a URL on your subdomain, which is less likely to affect e-mail deliverability. Configuring link branding is simple:
First, you need to enable link branding in the admin panel:
Next, you need a DNS entry pointing from your branded subdomain to your server’s IP address:
A url.mail xxx.xxx.xxx.xxx
Finally, you need to proxy requests form the branded subdomain to SendGrid:
<VirtualHost *:443> ServerName url.mail.mugo.ca SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off ProxyPass / https://sendgrid.net/ RequestHeader set Host "url.mail.mugo.ca" ProxyPreserveHost On <IfModule mod_ssl.c> SSLCertificateFile /path/to/fullchain.crt SSLCertificateKeyFile /path/to/privkey.key </IfModule> </VirtualHost>
Once configured, the final step is to open a ticket requesting the feature be enabled (I received a response within 12 hours, over the weekend, while using a free account).
Inbound parse webhook
SendGrid’s inbound parse webhooks are easy to configure and open up a realm of possibilities. There’s just two steps:
First, you add your subdomain (e.g. incoming.mail.mugo.ca) and callback URL to the SendGrid inbound parse list. All messages sent to this subdomain will be forwarded to the callback URL.
Next, you add an MX entry pointing from your subdomain to mx.sendgrid.net.
That’s it, now any mail sent to any address on the subdomain will be routed to your callback script, where it can be parsed and handled (the message text is provided as a POST payload).
Transactional message support
Transactional messages are triggered in response to user actions (account creation, password reset requests, or purchases, for instance). Like Bronto, SendGrid provides a full-featured transactional message API; however, unlike Bronto, SendGrid differentiates between transactional and marketing message templates, meaning you cannot send a transactional message using a marketing template -- even though you could copy the HTML source of a marketing template and paste it into a transactional template.
A side-effect of this is that substitution tags in marketing templates (e.g. [%first_name%]) are resolved based on the user’s SendGrid field data, whereas substitution tags in transactional templates need to be passed to the API during the transactional message call. The practical implication is that before triggering a transactional message, you must first fetch the necessary field data to include with the transactional call. With Bronto, the syntax for API-provided substitution tags and Bronto-stored fields is different, allowing a single message template to use both.
SendGrid is a feature-rich e-mail delivery service and even the free tier stacks up well against Bronto. Though Bronto’s workflow triggers are extremely powerful, they don’t come cheap. Depending on your needs and budget, SendGrid might be the right choice for you.
Need to revamp your marketing automation workflows? Contact Mugo for a consultation!
Commentsblog comments powered by Disqus
Hi, we're Mugo Web - Nice to meet you!
We're a group of web experts who solve complex web problems.Learn more about us »
- Business solutions (71)
- Case study (27)
- eZ Publish add-ons (21)
- eZ Publish community (11)
- eZ Publish development tips (66)
- Front-end development (3)
- Productivity tools (16)
- Site performance (12)
- User experience (32)
- Web accessibility (14)
- Web solutions (68)
- Work at Mugo (11)
Yes - we can do that.
Many years of experience with complex websites allows us to offer total solutions.Learn more about what we can do »
We love our clients (and they love us too)
We've solved problems across North America and around the world.Learn more about what we've done »
We tweet too
Follow us on Twitter for the latest Mugo happenings