- What's new
The Mailgun Maverick Program Is Here!
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
The Mailgun Maverick Program Is Here!
Force for Change: It's Time to Speak Out
When Should You Use An Email API?
4 Tips To Improve Your Email Deliverability In 2020
Mailgun’s COVID-19 Plan of Action
Inbox Placement - Delivery Made Simple
What we've been up to: Mailgun's 2019 Year in Review
How Do Users on G2 Rate Mailgun?
Mailgun Acquires Mailjet: Two Brands Working Together to Build Better Email
Quick Tips to Getting Started with Mailgun
Make Email Accessibility Your New Year’s Resolution
Sunset Policies: Allowing Unengaged Recipients to Ride Off into the Sunset
Email's Best of 2020
Catch-All Domain Support Is Now Available In Email Validations
The Best Time To Send Emails: Cracking The Code
Tips for Building Better Holiday Email Templates
Happy Festivus: Email Deliverability For The Holiday Season
The Basics of Email Subdomains
A Word of Caution For Laravel Developers
The Science and Art of Gmail Deliverability
Sunset Policies: Allowing Unengaged Recipients to Ride Off into the Sunset
Email's Best of 2020
Catch-All Domain Support Is Now Available In Email Validations
How To Improve Email Open Rates
Preparing Your Email Infrastructure Correctly
4 Tips To Improve Your Email Deliverability In 2020
COVID-19 Email Communications Dos and Don’ts
How To Use Parallel Programming
Mailgun’s COVID-19 Plan of Action
Password Meters Are Not For Humans
Always be in the know and grab free email resources!
Mailgun is committed to protecting your privacy. Please read ourPrivacy Policybefore providing us with your details.