To do this you will need to sign up for a sendgrid account and then add in your sendgrid details into the integrations area. This will have all built in email run through your sendgrid account. Now to add the unsubscribe link you need go into your sendgrid settings and under tracking you must enable or activate the subscription tracking. That is all nothing else to add. 

Please see the image below (click on it to enlarge)