Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable link tracking for certain links with Sendgrid and Rails

Is there any way to disable link tracking for certain links when sending emails from Rails through sendgrid?

like image 872
Mïchael Makaröv Avatar asked Feb 08 '23 15:02

Mïchael Makaröv


1 Answers

My recent search brought me here. I hope my late answer might help someone else in a similar situation.

Yes, there are ways:

  1. (kind of a hack): Modify the links so that SendGrid does not accept the format(but still renderable in mail client), such as to omit http:// or to add spaces around = in the anchor tag. For example: <a href = "www.sendgrid.com">Not Tracked</a>

  2. The official way: Add a clicktracking=off inside the anchor tag to tell SendGrid not to track it. For example: <a clicktracking=off href="http://sendgrid.com">Not Tracked</a>

like image 178
TZU Avatar answered Apr 28 '23 11:04

TZU