Using tokens for downloading .pdfs or .jpgs is not working. | Community
Skip to main content
David_Beasley
Level 2
April 15, 2019
Question

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

  • April 15, 2019
  • 2 replies
  • 3998 views

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

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

2 replies

SanfordWhiteman
Level 10
April 15, 2019

Output the entire <a> tag from Velocity.

Level 6
April 15, 2019

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

Level 6
April 15, 2019

Do you have it setup like this?

<a href="http://{{my.velocityToken}}">this is not good</a>

If so, then that is probably the issue. You should output the entire link / url within Velocity including <a href=""></a> tags opposed to using the email script's output within a link. This will break when link tracking is applied.

Here's a resource I use quite a bit for obscure email scripting info (written by Sanford from this community)

https://blog.teknkl.com/tag/velocity/

David_Beasley
Level 2
April 16, 2019

Thank you Mark for your replay.

Unfortunately, when I use the entire url as my token ie