Solved! Go to Solution.
Sorry about that, I created already a new thread with the issue.
Thanks!
Hi!
We have created an Email Template using Email Editor 2.0.
The links are being defined using variables:
<meta class="mktoString" id="c1ctaURL" mktoname="C1 - CTA URL" mktomodulescope="true" default="#" />
We applied the workaround mentioned in a few posts above in order to get these links tracked:
WILL BE TRACKED
#set ( $mylink = "www.marketo.com" )
<a href="http://${mylink}">Click Here!</a>
So the tag <a> in our template looks like:
<a href="https://${c1ctaURL}"
And of course, the c1ctaURL doesnt include any http
But after several tests, the links are not being tracked.
Are we doing something wrong here? Is there another solution to get this working since this post is from 2016?
Thanks!
Doesn't sound like this is related to a user-authored Email Script token, so should be a new thread.
This is great that this now works but a really bad implementation. Because now logic has to spread all over the place. I can't just create a token for the url, its really a token for the whole HTML including the <a> tag.
Hi Justin,
Is this only static links within email scripts that are converted to Marketo tracking links, or should links generated by the script also be tracked?
For example, if we have the code: <a href="${URLToken}">link</a> in our script, should we be able to track clicks? I submitted a support case about this and was told these links cannot be tracked at all, but I inferred from your post in February that we SHOULD be able to track them. Did I misunderstand?
Thank you!
Correct, it is only fully formed links that are present within an email script. If the output of the script is a link, that will not end up tracked.
There's been more confusion about this recently, so let me clarify a bit more:
Tracking will not work unless you are outputting a fully formed <a> tag from the script and the protocol of the href link must also be present in the href in order for the tracking link to be generated. Also, always double check that any fields being used in the script are checked in the right-hand pane!
WILL BE TRACKED
#set ( $mylink = "www.marketo.com" )
<a href="http://${mylink}">Click Here!</a>
WILL BE TRACKED (if lead.FirstName is enabled in right-pane)
#set ( $mylink = "www.marketo.com?name=${lead.FirstName}" )
<a href="http://${mylink}">Click Here!</a>
WILL NOT BE TRACKED
#set ( $mylink = "http://www.marketo.com" )
<a href="${mylink}">Click Here!</a>
WILL NOT BE TRACKED
#set ( $mylink = "www.marketo.com?name=${lead.FirstName}" )
<a href="${mylink}">Click Here!</a>
WILL NOT BE TRACKED
#set ( $mylink = "www.marketo.com?name=${lead.FirstName}" )
http://${mylink}
(then in email itself)
<a href="{{my.script}}">Click Here!</a>
WILL NOT BE TRACKED
#set ( $mylink = "www.marketo.com?name=${lead.FirstName}" )
${mylink}
(then in email itself)
<a href="http://{{my.script}}">Click Here!</a>
WILL NOT BE TRACKED
#set ( $mylink = "name=${lead.FirstName}" )
${mylink}
(then in email itself)
<a href="http://www.marketo.com?{{my.script}}">Click Here!</a>
I'd like to add that this also works:
WILL BE TRACKED
#set($bodytext = 'Click <a href="http://www.domain.com/register.html">here</a> to register for the webinar.')
(then in email itself):
$bodytext
Or in a program token:
{{my.bodytext}} = $bodytext
I just added some more color here: http://blog.teknkl.com/marketo-doesnt-like-velocimacros-for-output-but-define-is-fine/
But will tracking still occur if I'm not setting a variable containing a url but instead just displaying a link if the condition is met?
#if ($field1 == "bread")
www.google.com
#elseif ($field2 == "butter")
www.yahoo.com
#else
www.bing.com
#end
Will clicks link activity be logged for anyone who clicks on the link within the email?
You have to output a fully-fledged <a> tag, but yes.