Tracking links in email script? | Community
Skip to main content
January 13, 2014
Solved

Tracking links in email script?

  • January 13, 2014
  • 15 replies
  • 7551 views
We have created an email script which creates a newsletter based off preferences users have set in our database. Everything works fine and it organizes content in the email based off preferences, however something seems to have happened where since we have included the email script in the email template we no longer have access to tracking clicks. 

Is there anyway around this?
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
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!

15 replies

January 14, 2014
Concider using Marketo's out-of-box segmentation for your framework for dynamic content. Here is a link to an overview...With this basic approach you will have no issues with reporitng on engagment.
January 14, 2014
Links at email template level are not necessarily handled as the regular links added through Design Studio. There is a backgorund process to assemble the final email for each individual recipient.

I agree with Mark, a segmentation would be far more appropriate.
January 14, 2014
I understand segementations but it would not work for what we want to do, which is to create an email unique to each of our users preferences, based off content on our site (articles). 

We wanted to fully automate the process so no one has to update snippets or anything as we were doing before. It worked, but from what it looks like links are only tracked through what is in the email. In our email is just our email script which contains the html and coding for grabbing and displaying the right content.

Any other thoughts?
January 20, 2014
Alexander -

If I understand you correctly, what I think you're saying is that the links you are trying to track are not at all in the email template that you built in the Marketo Design Studio, but actually constructed in an email script token (using Velocity).  This token constitutes the entirety of the body of your HTML message to your leads?

I just checked some of my own messages that I built using the same method and can confirm - the links that you construct (and that Marketo delivers) via the email script token are not encoded for tracking.  Links in the same message that are *not* constructed using an email script token *do* get encoded for tracking.  It appears that Marketo processes links in the *body* of the message for tracking *prior* to interpreting the output of an email script token.

This makes me wonder what happens when you pass just a piece of a link as a token into the body of your message.  If the token is generated via an email script, my guess is that it would fail to be encoded and tracked as well.

Bottom line: I think I get what you're trying to do and there's no way, short of Marketo making a product enhancement, for you to both track your links *and* get the sophisticated level of automation and personalization you want.  The best you might be able to do is to add your own tracking codes to each link (using source and sub-source URL parameters) and track these on a per-person basis in whatever analytics package you use on your website.  At this point, however, any flows you'd like to set up based on click history or advanced reporting that you might try to perform within Marketo are basically dead in the water.

It's increasingly clear to me that there are very few folks (even within Marketo!) who know all the ins and outs of how email script tokens work.  It's been a steep and somewhat painful learning curve for me personally.  I'd like to see more documentation on using Velocity to create email script tokens.  If you (and others reading this discussion) agree, please like the related idea that I posted and add your comments with suggestions on what needs to be documented:

https://community.marketo.com/MarketoIdeaDetail?id=08750000000JYPuAAO

Thanks,
-patrick 
February 26, 2014
FYI -- I filed a support ticket regarding this issue and got the following potential solution. Haven't had a chance to try it yet but thought I'd throw it out there in case folks want to try it -- 

Thanks for getting in touch. Our email servers will add the tracking link before it populates script tokens. The way that our servers knows to add the tracking link to a set of text is if it sees the HTTP://, in this case it does not see this yet because the token has yet to be populated. 

To do this we ask customers to enter tokens which contain URLs as follows: http://{{my.DocumentLinks}} 

Your field then should not include the full URL ie: marketo.com but the URL minus the http:// so for example you should populate the field values withmarketo.com and the http:// will be manually added in the email to alert our system that this is a link. 
Mike_Reynolds2
Level 10
February 25, 2016

Elliot Shmukler​, Can you please message me directly (not in the thread here) with the case # where this info was given? I'd like to follow up with the Support Engineer directly on this to correct that information. Thanks!

February 26, 2014
Elliot -

The method you're describing works with standard lead tokens (e.g. http://www.foo.com/{{lead.First Name}}) , but does not work with email script tokens (e.g. http://www.foo.com/{{my.CustomToken}}). 

I have tested this extensively because of the ways we are using email script tokens in our Marketo messages.  I've also been navigating a related support case confirming all the details. 

You have to add the mktNoTrack class on any link that is built using email script tokens.  Otherwise, Marketo will mangle the link when the email is processed for sending.  Note that any sample messages you send will actually render everything just fine because Marketo doesn't make any of those links trackable during a test send.

-patrick
February 26, 2014
In conclusion, if I understood the previous threads, Marketo currently does not replace links in Email Script Token with tracking links that would allow us the capability to track link performance within Marketo.

Hopefully in future versions the system can add tracking link after email scripting token is added.
February 26, 2014
Jiun - Sadly, your summary is spot-on. 

What's worse, if you try to construct a link using an email script token for just a part of the link, Marketo will actually cause that link to break when the message is delivered using trackable links.
Justin_Cooperm2
Justin_Cooperm2Accepted solution
Level 10
April 10, 2014
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!
April 10, 2014
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