My token seems to be adding additional characters?

Kirsten_Hughes
Level 2

My token seems to be adding additional characters?

Hi all,  I've been using a program token to quickly update create URLs behind buttons in a number of our campaigns - they're direct links to an offer/promotion on our site.  Set up is as follows:

www.website.com/?offercode={{my.offerlink}}&utm_source=email&utm_campaign=RET_LV

Example URL with token value:

www.website.com/?offercode=d2172471-7485-414e-b5d5-efd009e52c7e&utm_source=email&utm_campaign=RET_LV

This has been working perfectly for some time, until I went to update the tokens today with fresh offer codes - Marketo is now adding a ? in front of the token details, (eg: ...com/?offercode=?d2172471-7485...) which means the URL doesn't work - it reaches the site, but not the offer.  Does anyone know what might be causing this and how I can stop it, or is this a bug?

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: My token seems to be adding additional characters?

You haven't provided enough information, namely an example value of your {{my.token}}.

Note while this is technically a valid URL, it's highly out of the ordinary because it does not have a query string:

http:​//www.example.com/offercode=anything&utm_source=email&utm_campaign=RET_LV

The fact that this URL doesn't include a ? to mark the start of the query string is extremely suspicious.

Kirsten_Hughes
Level 2

Re: My token seems to be adding additional characters?

Hi Sanford,  Thanks for your quick response.  The missing ? was a typo on my part - have updated query with relevant info.

SanfordWhiteman
Level 10 - Community Moderator

Re: My token seems to be adding additional characters?

OK, is the real website www.website.com?  If not, please use www.example.com or the actual domain to avoid confusion.

What do you see if you output the same {{my.token}} outside of an <a> tag? (In other words, does the token have a ? prepended to it when just used in HTML text?)

And what if you turn off tracking on the link?

Gerard_Donnell4
Level 10

Re: My token seems to be adding additional characters?

Does your knew token have any weird characters at the start? Have you tried swaping out the token with a different one? When you do, do you still get the question mark?

Stephen_Baker2
Level 2

Re: My token seems to be adding additional characters?

I suspect there's an extra question mark being added in the template before the token starts or it's being inserted into the token. And it probably has to do with trying to dynamically allow custom URL parameters. I would look at the template/email code where the token is being inserted

I've totally not done this before ( ͝° ͜ʖ͡°)