Search code examples
sendgridmass-emails

Tracking email responses


What is the best way of tracking responses for email campaigns? I was thinking on adding something to the reply-to field of the email (for example [email protected]), but I'm not sure if there is something more neat that could avoid this?

I thought about headers too, but it's important to note that the address [email protected] would send many different campaigns, and the 'in-reply-to' header info would not be useful then to differentiate (while using luqita+campaign1 or luqita+campaign2 could)

What can I do?


Solution

  • So you want to be able to execute some logic when someone replies to an email you have sent through SendGrid? If you have access to change the MX record of the domain of the email address at which you want to receive the replies, you could use SG's Parse API to get a POST request to a script whenever email is receive at the address.

    I think you would indeed have to set a magic reply-to address for each campaign. This seems like a perfectly fine solution; it's also how SG itself tracks bounces - it sets the return-path to something like bounces+{attempted-recipient-email}@sendgrid.com. Then examine the 'to' parameter of the POST notification you receive to know which campaign the reply is associated with.