Retain css of links after enabling click-tracking of send-grid

265 views Asked by At

I am trying to send a button through sendgrid using their click tracking but they change the link when being delivered to enable tracking. and that changes the css of the link. how do i keep the css and enable click tracking using sendgrid. I am using node-mailer for rendering and sending of mail with send-grid-transport. you can see the screenshots below for better understanding

without click tracking enabled:

enter image description here

with click tracking enabled:

enter image description here

EDIT:

the code for my button is below

<a href={{'https://www.facebook.com/share.php?u='+url}} style="margin:20px 20%;border:1px solid;display:block;padding:10px 16px;text-decoration:none;border-radius:2px;text-align:center;vertical-align:middle;font-weight:bold;white-space:nowrap;background:#ffffff;border-color:#3a5795;background-color:#3a5795;color:#ffffff;border-top-width:1px" target="_blank">
                  Share on Facebook
              </a>
1

There are 1 answers

3
Andrei Stangacianu On

You could use inline styling and add the CSS as part of the tag. That won't be changed by SendGrid.