Hello all,
Bear with me here - we have emails with a survey link that go out after someone purchases a product.
This survey link is pulled from a Custom Object record and the CTA and link is placed into the email using a script like this:
##Standard Velocity Date/Time Fields
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Chicago") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
#set( $ISO8601DateTime = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateTimeWithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $ISO8601DateTimeWithMillisUTC = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" )
#set( $ISO8601DateTimeWithMillisTZ = "yyyy-MM-dd'T'HH:mm:ss.SSSZ" )
##iterate Customer Loan object records and set Mortgage Purchase Survey Link Last Updated to usable value for script
#foreach( $item in $customerLoansList )
#set( $mortgagePurchaseSurveyURL = $convert.parseDate(
$item.surveyLinkLastUpdatedMortgagePurchase,
$ISO8601DateOnly,
$defaultLocale,
$defaultTimeZone
) )
##Sets difference from Last Updated Mortgage Purchase Survey Date and Current Date for between -4 and 0 Days
#set( $pastDiff = -4 )
#set( $currentDiff = 0 )
#set( $diffDays = $date.difference($calNow,$mortgagePurchaseSurveyURL).getDays().intValue() )
#set( $acceptableDiffs = [$pastDiff..$currentDiff] )
#if( $acceptableDiffs.contains($diffDays) && (!$item.surveyLinkMortgagePurchase.isEmpty()) && (!$item.surveyLinkLastUpdatedMortgagePurchase.isEmpty()) )
<tr id="buttonOnly" mktoname="Button" class="mktoModule">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px !important; padding: 0px;">
<!--[if mso | IE]>
<tr>
<td class="" width="600px">
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600">
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px !important; direction: ltr; font-size: 0px; padding: 5px 20px; text-align: center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="" style="vertical-align: middle;width:560px;">
<![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:center;direction:ltr;display:inline-block;vertical-align: middle;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: middle;" width="100%">
<tr>
<td align="center" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px !important; font-size: 0px; padding: 10px 25px; word-break: break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: separate; line-height: 100%;">
<tr>
<td align="center" bgcolor="#0071CE" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px !important; padding: 0px; border: 2px solid #0071CE; border-radius: 6px; cursor: auto; mso-padding-alt: 17px 30px; background: #0071CE;" valign="middle">
<a class="mktNoTrack" href="https://$item.surveyLinkMortgagePurchase" style="display: inline-block; background: #0071CE; color: #FFFFFF; font-family: 'Poppins', Arial; font-size: 16px; font-weight: bold; line-height: 120%; margin: 0; text-decoration: none; text-transform: none; padding: 12px 20px; mso-padding-alt: 0px; border-radius: 6px;" target="_blank">Take Survey</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]-->
</td> </tr>
#break
#else
#end
#end
So because I'm using a #foreach statement, I removed the tracking code so the link would resolve correctly. From what I can test the links work and resolve correctly - but because of removing tracking, I can't actually see clicks on the CTA.
So in context if someone comes to me and says "we have not had any survey results", as far as I know I have no way of knowing that clicks were made. Maybe the link didn't resolve, maybe nobody clicked, etc.
Is there ANY sort of way to have the tracking removed from the URL pulling from the field, but see that a button was clicked on? Would it be more like using a "visited web page" or something to track outside of the link itself?
Solved! Go to Solution.
Add a query param and use Visit Web Page. This will exclude people who block Munchkin, of course, but it's otherwise identical to Click Email when the target is a webpage.
Got it, thank you!