[SalesForce] Disable link wrapping / url tracking for one href

Currently i am setting up some emails with a mailto: with subject line and body.
Unfortunately the href that has mailto: in its property always gets wrapped that salesforce can measure the clicks that have been done on this link.

The problem is that this breaks the functionality on mailto:

Here is my Script and the corresponding html
:

%[
var @mailto, @mailtobase, @subjectline, @body
var @name, @uuid, @email, @alias
set @name = [name]
set @uuid = [uuid]
set @email = [email]
set @alias = "Unsubscribe"
set @mailtobase = 'mailto:emailadress@salesforce.com?'
set @subjectline = Concat("subject=Cancellation of newsletter subscription, customer ",@uuid)
set @body = Concat("&body=My Data:,<br><br>Company:", @name,"<br>Customer number: ",@uuid,"<br>E-Mail: ",@email)
set @mailto = Concat(@mailtobase,@subjectline,@body)
]%%

Would you like to <a alias="%%=v(@alias)=%%" conversion="false" data-linkto="mailto:" href="%%=v(@mailto)=%%" style="color:#E3051B;text-decoration:none;font-weight : bold; " title="">unsubscribe</a>?

The output is of the href is a link that got wrapped to the http://click.ourdomain.com/?qs=XXXXXXXXXXXXXXXXXXXXXXXX

Questions:

  • How can i disable this link from being wrapped?
  • How can i disable this link from being changed but that it will still be tracked?

I do not want to disable the other tracking in the email.

Best Answer

A couple ways to do this are:

Obsfucate the link:

%%[
var @unsubLink
set @unsubLink = Base64Encode('<a href="http://domain.com/unsubscribe">unsubscribe</a>')
]%%

%%=Base64Decode(@unsubLink)=%%

This example is from @EliotHarper 's answer here

Another way is to utilize a CONCAT inside the href:

<a href="%%=CONCAT("mailto:", @mailto)=%%"> which will cause the processer to view it as an invalid link.

Previously just storing the link as an AMPScript var would cause the link to skip getting tracked, but it appears this is not working in your case.

I would also verify that the final mailto var you have is correctly outputting a valid mailto link as this could be causing the issue as well.

Related Topic