We use buttons for our call to action links in emails, which go to recipients mostly at financial firms, which means they mostly use Outlook. Because of this, my button code includes conditional comment blocks (<!--[if (gte mso 9)]>...<[endif]-->
) to insert VML code for Outlook's Word rendering engine (thank you, Microsoft).
For the entire area of the button to work, I must include an href="url" attribute in the VML block. Being inside the commented code, this URL then doesn't get recognized and tracked by Marketing Cloud. If I don't include the href
attribute, then only the text of the button is clickable, but tracked. How can I encode the URL to be trackable and clickable for the entire area of the button in Outlook?
A sample code snippet is below. I have a few ideas for solutions if someone can confirm any of them or direct me to other resources:
- Send a preview test, then grab the urlID from the tracking report from it and somehow encode my "hidden" URL with
href="http://cl.exct.net/?[query]=[urlID]"
. If this can work, what is the query and will this also pick up subscriber data? - Is there an AMPscript solution? I don't currently use any AMPscript, but could easily learn.
Is there an alternative suggestion for coding the button? I haven't found one that works this well for multiple clients after many searches.
... <td align="center" bgcolor="#FE5000" height="28" style="border-collapse: collapse !important; color: #ffffff; display: block; height: 28px; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0 !important; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; vertical-align: middle; width: 146px;" width="146"> <!--[if (gte mso 9)]> <v:rect href="http://exampleurl.com" style="behavior:url(#default#VML);display:inline-block;position:absolute; height:28px; v-text-anchor:middle; width:180px; top:0; left: 0; border:0; z-index:1;" stroke="f" fillcolor="#FE5000" > <w:anchorlock/> <center style="color:#ffffff;font-family:sans-serif;font-size:12px;font-weight:bold;"> <![endif]--> <a href="http://exampleurl.com" style="..." target="_blank" title="Register"> <span style="color: #FFFFFF;"><strong>Register now</strong></span> </a> <!--[if (gte mso 9)]> </center> </v:rect><br /><br /> <![endif]--> </td> ...