Auth0 Home Blog Docs

HOWTO: Disable SendGrid's Click Tracking Feature in an Auth0 email template

SendGrid offers a feature called Click Tracking which allows customers to track when links are clicked in an email.

This works by SendGrid scanning your outgoing emails and replacing your links with a link generated by SendGrid.

Example: you have the following link in your email <a href="http://my_link" Please Click Here</a>

When SendGrid’s Click Tracking feature is Enabled, you’ll discover that your outgoing email with the embedded link has been changed, the link will now look something like this:

<a href="https://u9946203.ct.sendgrid.net/wf/click?upn=nDeVIc0FUsgX2zv" Please Click Here</a>

This feature is enabled by default from my experience or you may have it enabled for an email campaign you are running, in either case what if you are using SendGrid as your Auth0 email provider and you do not want links in your auth0 email templates to be tracked by Click Tracking?

If turning off Click Tracking in your SendGrid settings is not an option, then the answer is to use the clicktracking=off attribute in your Auth0 email templates.

Simply add the attribute to any links in your auth0 email templates that you do not want tracked.

<a clicktracking=off href="http://my_link" Please Click Here</a>

The change is easy to make and will give you the best of both worlds, you can keep Click Tracking enabled for any email campaigns you are running and ensure that SendGrid does not change your outgoing email links when sending email from Auth0 using an email template.

Documented here on SendGrid’s site: https://sendgrid.com/docs/ui/analytics-and-reporting/click-tracking-html-best-practices/

1 Like

Let us know if you’ve got any questions regarding that!