Dynamically adding date to url string

Anonymous
Not applicable

Dynamically adding date to url string

Hi Community

Within an engagement program, we would like to dynamically populate links to include the date the email was sent out for utm tracking. Anyone know how to do this, I don't believe a system. or my. token will work?

Thanks

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically adding date to url string

I don't believe a system. or my. token will work?

Why would {{system.date}} not work?

Anonymous
Not applicable

Re: Dynamically adding date to url string

I re-looked and I was using this token within a my.token for url strings and it wasn't working. I added it to the actual URL sting in the email link and it added strange characters e.g. "Aug%2008,%202017". So I added a my.Date token instead and it has worked.

SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically adding date to url string

%20 isn't strange. It's the mandatory way of encoding spaces in any URL. You can't have raw spaces in a URL.

What is your my.Date token? A Velocity token?

Anonymous
Not applicable

Re: Dynamically adding date to url string

Actually the my.Date token is not going to work as it is not dynamic. Any other thoughts?

SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamically adding date to url string

Yes, a Velocity token. See my other answer from earlier today and use this format strong:

  "yyyy-MM-dd"