SOLVED

Re: Email scripting - identical links not working

Go to solution
Phillip_Wild
Level 10

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Email scripting - identical links not working

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

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Email scripting - identical links not working

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?

Phillip_Wild
Level 10

Re: Email scripting - identical links not working

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Email scripting - identical links not working

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

Phillip_Wild
Level 10

Re: Email scripting - identical links not working

Got it. Thanks, Sanford, I learnt a new trick!

 

So the redirect page showed variables which I wasn't using....which made me double-check how the template was working. Basically, it wasn't using that email script token, but another token, which was broken. That's why it wasn't working.

 

A good lesson, check my assumptions!