I am working on an email that will be sent out as a marketing effort. Within the email there will be a button that will allow people to "save the date" of the event and I want to be able to detect if the email was opened in gmail after the button is clicked, and if it was opened in gmail it would serve a Google Add to Calendar link - else it would serve an ICS file.
There is another email that does exactly this, it does not detect user agent since, regardless of the browser and os and device, if the email was opened in gmail it would redirect to google's add to calendar!
I've been trying to figure this out for a while now and have tried many trick, though none successful, I would love to see what other ideas people have.
Edit: I noticed that gmail will add data-saferedirecturl to all links
I'm wondering if there is a way to detect this?