Email scripting - identical links not working | Community
Skip to main content
Level 9
Jul 23, 2020 5:19 AM UTC
Solved

Email scripting - identical links not working

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.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jul 28, 2020 2:56 AM UTC

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

4 replies

SanfordWhiteman
Level 10
Jul 23, 2020 6:19 AM UTC

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?

Translate
Level 9
Jul 28, 2020 2:29 AM UTC

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

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jul 28, 2020 2:56 AM UTC

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

Translate