AnsweredAssumed Answered

Calling a Token using Javascript

Question asked by Robb Barrett Expert on Oct 20, 2015
Latest reply on Oct 20, 2015 by Sanford Whiteman

I'm building a page and I want it to have information from a token, which I'll pass through a URL parameter.


Example: URL is


What I want to happen is have the page then put in {{my.Token1}} into the HTML.  The problem is that Marketo blocks the token from being created. As you can see below, I present the parameter 3 times: once with square brackets, once with curly braces and once nude. It's blocking the curlies which would create the token.


How do I get it to allow the token to happen?


Code I'm using with URL parameter "first=Link1"



document.getElementById("showParamsContainer").innerHTML =

"<p>Contact Name:<b>[[my."+getParameterByName("first") +"]]</b></p><p>This is the token: {{my."+getParameterByName("first") +"}} <b>End of line.</b><br /><br />"+getParameterByName("first") </script>




Contact Name:[[my.Link1]]

This is the token: End of line.