Email scripting - identical links not working | Community
Skip to main content
New Participant
July 23, 2020
Solved

Email scripting - identical links not working

  • July 23, 2020
  • 1 reply
  • 3775 views

I feel like this is obvious. But I can't seem to figure out why two almost identical scripts are giving me different results.

 

This doesn't work - it outputs a button that looks right, but after clicking it, Marketo never redirects from my email tracking link domain, and it sits on a blank page.

 

##set survey URL here - everything before the question mark, but without the https:// ##default parameters included: ##sfid, gender, marketing region, number of tours, age bracket #set($surveyURL = "net03.crowdtech.com/go.aspx?sfid=${lead.Account_ID__c}&gender=${lead.Gender__c_account}&region=${lead.Segmentation_MarketingRegion_1004}&tours=${lead.Segmentation_NumberOfTours_1029}&age=${lead.marketingAgeRange}") ##set button CTA here #set($buttonText = "Take the survey") ### ---no need to touch anything below here ----- <a href="https://${surveyURL}" style="mso-line-height-rule: exactly; vertical-align: top; display: block; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff; font-weight: bold; line-height: 24px; text-decoration: none; text-align: center; background-color: #513393; background-image: none; background-repeat: repeat; background-position: top left; background-attachment: scroll; padding: 10px; border: 1px solid #513393;">${buttonText}</a>

 

However, this one does work. It's a header image instead of a button, but the image outputs beautifully, as does the link.

 

##set survey base URL here ##default parameters included: ##sfid, gender, marketing region, number of tours, age bracket #set($surveyURL = "net03.crowdtech.com/go.aspx?sfid=${lead.Account_ID__c}&gender=${lead.Gender__c_account}&region=${lead.Segmentation_MarketingRegion_1004}&tours=${lead.Segmentation_NumberOfTours_1029}&age=${lead.marketingAgeRange}") ##set header image URL here. Get this from the Marketo Design Studio. ##likely you won't need to change it unless you want something other than the default. #set($headerURL = "REDACTED") ### ---no need to touch anything below here ----- <a href="https://${surveyURL}" style="color: #513393; font-weight: bold; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"> <img src="${headerURL}" width="600" border="0" class="deviceWidth" style="display:block;border-width:0;-ms-interpolation-mode:bicubic;"> </a>

 

Any reason why? What am I missing here?

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

What does the rewritten link look like exact (view-source on the branding domain page).

1 reply

SanfordWhiteman
New Participant
July 23, 2020

Links are always fun in Velocity. Incredibly finicky when variables are used.

 

What happens in your first example when the inner text is hard-coded, instead of from a variable?

New Participant
July 28, 2020

Hmmm.... it doesn't work with hardcoded variables either. Strange.

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
July 28, 2020

What does the rewritten link look like exact (view-source on the branding domain page).