Using tokens for downloading .pdfs or .jpgs is not working.

Using tokens for downloading .pdfs or .jpgs is not working.

Hi Everyone,

I have an email where i want the user to click to download a personalized .pdf or jpg. The specific file they download depends on their email address.

So I use a token for the download link called {{my.CMOcert}}

The velocity script assigns the value of the image url (except for the http:// part of course) to the token CMOcert based on email address.

So then in my HTML, I say "Get your personalized certificate <a href="http://{{my.CMOcert}}">here</a>

So when I set up the email in a campaign and run it using my own email address, I clicked the link and nothing happens. What am I doing wrong, or perhaps tokens do not work with URLs?

This should work right? If someone can help, please do!

Big Dave

16 REPLIES 16
Level 10 - Community Moderator

Re: Using tokens for downloading .pdfs or .jpgs is not working.

Output the entire <a> tag from Velocity.

Level 5

Re: Using tokens for downloading .pdfs or .jpgs is not working.

woopsy, had the reply window open too long, shoulda known you would be on it

Re: Using tokens for downloading .pdfs or .jpgs is not working.

Hi Stephen. It doesn't work. In fact, making the token the entire url

results in a blank space. Dang I am really stuck.

On Mon, Apr 15, 2019 at 4:10 PM Sanford Whiteman <

Level 10 - Community Moderator

Re: Using tokens for downloading .pdfs or .jpgs is not working.

Sanford. Or Sandy.

Please show us the exact code of your Velocity token (highlighted as Java, the closest language match).

Re: Using tokens for downloading .pdfs or .jpgs is not working.

#if( $lead.Email == "myemail@mydomain.com" )<a href=" http://na-ab22.marketo.com/rs/343-QLB-570/images/fistandlastname.jpg">here</a>

#end

I had to sanitize the email and url a bit, but you get the picture.

So the call-to-action in the html email says "you may download your

certificate {{my.CMOcert}}." and of course the token "should" then display

as the word "here" linked to the image to be downloaded.

I am seriously stuck. When I test the email (not via send sample but as an

actual smart campaign which send s the email to me), the link is

missing...just a blank space.

Dave B.

On Mon, Apr 15, 2019 at 5:06 PM Sanford Whiteman <

Level 10 - Community Moderator

Re: Using tokens for downloading .pdfs or .jpgs is not working.

Please highlight the code as Java to maintain readability. (Otherwise the Jive editor changes the content, not to mention the variable-width font is not accessible.)

There's no <a> tag at all in your code as currently shown.

Re: Using tokens for downloading .pdfs or .jpgs is not working.

Highlight the code as java?

On Mon, Apr 15, 2019 at 5:36 PM Sanford Whiteman <

Level 10 - Community Moderator

Re: Using tokens for downloading .pdfs or .jpgs is not working.

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter_v3.gif

Re: Using tokens for downloading .pdfs or .jpgs is not working.

#if( $lead.Email == "myemail@mydomain.com" )<a href=" http://na-ab22.marketo.com/rs/343-QLB-570/images/fistandlastname.jpg">here</a>

#end

Sorry I cannot see where I can access the "highlighting" option.

On Mon, Apr 15, 2019 at 5:55 PM Sanford Whiteman <