0

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.

5

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.

4
  • <a href="%%=CONCAT("mailto:", @mailto)=%%"> creates an output like http://click.ourdomain.com/%%=concat( when you click on that "unsubscribe". Gonna Test base64 en and decoding now Oct 4 '18 at 13:17
  • Did you remove the duplicate mailto: that would be in your mail to var? Oct 4 '18 at 13:29
  • Yes i removed it. Oct 4 '18 at 13:33
  • Base64 was the solution. Atleast it worked ;) now i am stuck with the problem how it is possible to insert a linebreak in the email body inside mailto ;) Oct 4 '18 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.