Search code examples
phpsendgrid

How to get all analytical data from SendGrid using "Unique Args" or is there another way?


Example:

to: john@gmail.com, mark@gmail.com, lisa@gmail.com

subject: "New feature"

body: "We have developed a new feature,..."

What I need:

  • a combined analytics data from all recipients about this particular email
  • an identifier for each email, with which I can track how well email is performing

I've found two approaches:

  • Categories
  • Unique Arguments

Solution with "categories" suits my intent, but I believe its purpose is to label multiple emails with the same topic.

Solution with "unique arguments" isn't the best, because my app needs most of the analytical data SendGrid provides (clicks, opens, delivered, bounces, blocks,... etc) with as few interactions with SendGrid as possible. If I would use this approach, API calls would skyrocket.

My questions are:

What do you recommend I use?

Is there another way I could approach the problem, if so, what?


Solution

  • The solution are Event Webhooks. Check out this link.