- What's new
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
We believe in doing hard work for our customers. So when we decided to add geolocation and user agent parameters to our open, click and unsubscribe webhooks, we decided to take it one step further than simply providing an IP address and a raw user agent string for customers. Providing only these values forces you to translate IP to city or country and to delve into the obscure world of user agent strings to find out if the email was opened on a tablet or desktop or whatever. You’ve got better things to do, so here are the details.
With the new geolocation parameters in open, click and unsubscribe web hooks, Mailgun provides the following:
IP– IP address the event originated from.
Country– Two-letter country code (as specified by ISO3166) the event came from or ‘unknown’ if it couldn’t be determined.
Region– Two-letter or two-digit region code or ‘unknown’ if it couldn’t be determined.
City- Name of the city the event came from or ‘unknown’ if it couldn’t be determined.
In short, you still get the IP address, but you also get the most common information that can be derived from IP address, without any additional parsing or decoding on your end.
For user agent detection, you get
User-agent– User agent string of the client triggered the event.
Device-type– Device type the link was clicked on. Can be ‘desktop’, ‘mobile’, ‘tablet’, ‘other’ or ‘unknown’.
Client-type– Type of software the link was opened in, e.g. ‘browser’, ‘mobile browser’, ‘email client’.
Client-name– Name of the client software, e.g. ‘Thunderbird’, ‘Chrome’, ‘Firefox’.
In short, you get the plain English version of user agent, without writing your own parser.
See our docs for a full list of web hook parameters for opens, clicks and unsubscribes.
If you want to capture this detailed geo-location and user agent data in your application, say, to create custom reports in your email marketing application built on top of Mailgun, its really easy. All you have to do is set up a webhook in the Mailgun Control panel. When you specify a url where you will accept POSTs, Mailgun will send you all these parameters.
Anything else you’d like to see passed in webhooks? Let us know in the comments.
The Mailgunners
Last updated on August 28, 2020
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
How To Improve Your Email Deliverability In 2022
Mailgun Joins Sinch: The Future of Customer Communications Is Here
Continuing Our Commitment: HTTPS Innovation And Optimization
Your Guide To Webhooks
Easier and Faster Implementation with Our Updated SDKs
Mailpets: For The Love Of Animals
The Mailgun Maverick Program Is Here!
Force for Change: It's Time to Speak Out
When Should You Use An Email API?
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Become an Email Pro With Our Templates API
Google Postmaster Tools: Understanding Sender Reputation
Navigating Your Career as a Woman in Tech
Implementing Dmarc – A Step-by-Step Guide
Email Bounces: What To Do About Them
Announcing InboxReady: The deliverability suite you need to hit the inbox
Black History Month in Tech: 7 Visionaries Who Shaped The Future
How To Create a Successful Triggered Email Program
Designing HTML Email Templates For Transactional Emails
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Implementing Dmarc – A Step-by-Step Guide
Announcing InboxReady: The deliverability suite you need to hit the inbox
Designing HTML Email Templates For Transactional Emails
Email Security Best Practices: How To Keep Your Email Program Safe
Mailgun’s Active Defense Against Log4j
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
Email's Best of 2021
5 Ideas For Better Developer-Designer Collaboration
Mailgun Joins Sinch: The Future of Customer Communications Is Here
Always be in the know and grab free email resources!
By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy.