SOLVED

Tracking links in email script?

Go to solution
Justin_Cooperm2
Level 10

Re: Tracking links in email script?

Hi all,

It is correct that this is currently a product limitation. Links are not decorated with tracking information if the link is inserted via email scripting. Our product team is aware of this limitation and it is something we'd like to resolve in the future.

Regarding sending sample emails, we are currently working on a bug fix so that links in sample emails will appear as if the email was sent as a production email (so you can see exactly what your lead(s) will see). Look for this to be released in the next one or two releases.

Thanks!
Anonymous
Not applicable

Re: Tracking links in email script?

Hey Justin,

Great to hear that you guys are working on this!

You've probably thought through the pros and cons already, but on the bug fix I would be careful about rendering the sample email exactly as if it were sent via production.  It's actually really helpful in testing to not see encoded links, but to see the constructed links without encoding.  In testing, you can hover over each link in the sample you've sent yourself and see that they are properly constructed (without necessarily always having to click).

Honestly, though, it would be even better to have a pop-up preview option while you're building a message so that you can pick a constituent and see the constructed message (without having to send the sample through the email rendering engine to your own or another's inbox).  MailChimp does this quite nicely, though the pain in MailChimp is having to cycle sequentially through each member of your target list to get to a specific test case.

At a minimum, it would be nice to have the option to control at the time of sending a sample message whether the links in the message should be encoded or not.

Thanks,

-patrick
Anonymous
Not applicable

Re: Tracking links in email script?

This appears to have been launched. 
Justin_Cooperm2
Level 10

Re: Tracking links in email script?

Correct, links in sample emails are now decorated and any link you place in an email script will be converted to a Marketo tracking link.
Anonymous
Not applicable

Re: Tracking links in email script?

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!

Justin_Cooperm2
Level 10

Re: Tracking links in email script?

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.

Justin_Cooperm2
Level 10

Re: Tracking links in email script?

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>

Anonymous
Not applicable

Re: Tracking links in email script?

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking links in email script?

Wyatt_Bales4
Level 4

Re: Tracking links in email script?

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?