How to use my.token in CTA URL | Community
Skip to main content
September 9, 2016
Solved

How to use my.token in CTA URL

  • September 9, 2016
  • 2 replies
  • 7294 views

Hello,

I have a to build a unique url and wire it to CTA in the emails. values that are used to build the URL are in a custom object. I have built a custom token to build the url.

1. Token - my.customURL

#set($myPmtUrl = $!{TriggerObject.paymentConfirmUrl})

#if ((! $myPmtUrl) || ("$!myPmtUrl" == "") || "$myPmtUrl" == "")

  #set($url = "beta3.myDomain.com/#login")

#else

  #set($url = "beta3.myDomain.com$!{myPmtUrl}")

#end

<p><a href="${url}" style="padding: 10px; width: 150px; display: block; text-decoration: none; border: 0; text-align: center; font-weight: bold; font-size: 14px; font-family: Arial, sans-serif; color: #ffffff; background: #008ed3; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; line-height: 17px; text-transform: uppercase; letter-spacing: 1px;" class="button_link">LOG IN</a></p>

With this approach I can access the token {{my.customURL}} in the body of the email. renders perfectly well. Problem - This link is not wrapped with Marketo tracking. So it does not show in the reports.  we do not know if the users clicked the links.

2. Token - my.customUrl2

#set($myPmtUrl = $!{TriggerObject.paymentConfirmUrl})

#if ((! $myPmtUrl) || ("$!myPmtUrl" == "") || "$myPmtUrl" == "")

  #set($url = "/#login")

#else

  #set($url = "$!{myPmtUrl}")

#end

${url}

this token return the unique portion of the url. In the Edit link(CTA) portion I have done this.

URL: https://beta3.mydomain.com{{my.customURL2}}

DISPLAY TEXT : LOGIN

[x] Track link

[x] Include mkt_tok

This setup (if works) would be the best.However when I add the token to the URL attribute it doesn't work.  Add Tokens to an Email Link - Marketo Docs - Product Docs  only has lead tokens in the url. I have reviewer other discussions, most them talk about the same. 

@Sanford Whiteman​ i saw the discussion about the unique url with leadID Passing unique Marketo id in a survey URL​. How can I create similar with data from custom object ?

Anyone did something similar ? thanks for your help.

-mahesh

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

Please read this:

http://developers.marketo.com/email-scripting/

You are using email scripting, which is different from normal tokens. In order to make the link tracked, you must follow this pattern:

https://nation.marketo.com/message/121266#111193

2 replies

Will_Thomas
Level 2
September 9, 2016

You might be able to run a campaign within your program that will map the my.token onto a lead field, then use the lead field in the URL.  If the my.CustomURLs are being built correctly this might solve your problem.

September 9, 2016

William - we don't want to add any more custom fields to lead. Thanks though.

Justin_Cooperm2
Justin_Cooperm2Accepted solution
Level 10
September 9, 2016

Please read this:

http://developers.marketo.com/email-scripting/

You are using email scripting, which is different from normal tokens. In order to make the link tracked, you must follow this pattern:

https://nation.marketo.com/message/121266#111193

Justin_Cooperm2
Level 10
September 9, 2016

See my comment toward the bottom of that thread...

September 19, 2016

Thanks @Justin Cooperman and Michael Florin