Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sendgrid: how to use different tracking settings for different sets of messages

My application needs to send some messages with tracking activated and other messages without tracking.

When using Sendgrid, many settings, among them tracking settings, can be set using the admin web interface, and these settings will be used for all subsequent messages sent.

But is it possible to have different settings for different sets (or categories ?) of messages, and have the application define which settings to use when sending a given message through API ?

Or maybe define the tracking settings as part of the send API parameters ?

like image 433
patb Avatar asked Sep 08 '25 03:09

patb


2 Answers

Yes. When sending via the v3 API, there's a tracking_settings field, where you can dynamically enable/disable settings for just that message.

There's a similar option when using the SMTPAPI JSON header.

like image 74
jacobmovingfwd Avatar answered Sep 11 '25 00:09

jacobmovingfwd


I have similar problem. After some investigation found two satisfactory solutions. The fist one - integrate with google analytic. The second - we moved all dynamic templates into application (also due to sg limitation for dynamic content) and added specific utm tags (UTM_SOURCE, UTM_CONTENT, UTM_MEDIUM, UTM_CAMPAIGN, UTM_TERM;) to each letter. And after user click on emails content FE process this tags.

like image 24
smaiakov Avatar answered Sep 11 '25 01:09

smaiakov