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

4.9k Views Asked by At

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

2

There are 2 best solutions below

0
On

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>

1
On

You can now turn this on and off easily within SendGrid, see the docs. There is also an option to brand your tracking links with your own domain. This requires setting some DNS settings but means you have your own links in emails and they also get tracked.