Skip to main content
March 15, 2016
Question

Missing styles for tracked links in snippet updated via API

  • March 15, 2016
  • 1 reply
  • 2068 views

I'm using Marketo's REST API to update snippet's content which is HTML code with several URLs. By default all links are tracked and are replaced when emails are sent.

The issue is that inline styles specified for those a elements disappear. Example:

Snippet's <a class="mktNoTrack" href="example.com" style="color: #5b6770; text-decoration: none;" target="_blank">Example</a>

is converted in email to

<a href="go.example.com/123" target="_blank">Example</a>

class="mktNoTrack" doesn't make any use, it is just ignored. However, if I open the snippet for edit in Marketo's dashboard and it gets autosaved the styles appear okay in tracked link. Very weird. As snippet's update is automated opening it manually each time is not a solution to the problem

Any ideas how to deal with it?

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

1 reply

SanfordWhiteman
Level 10
March 15, 2016

First: why are you trying to add mktNoTrack, yet not caring that it doesn't function in this context? Do you want the links to track or not?

March 15, 2016

Preferably yes, I'd like to have them tracked. Sorry for the example, my intention was to show that even with the class the URL is still replaced, so the class is just ignored (again only when snippet is updated and approved via API and not opened after that in dashboard's UI).

SanfordWhiteman
Level 10
March 15, 2016

OK, I can see how this serves as another demonstration (it was confusing because mktNoTrack is a "server-side" class unlike presentation-only CSS classes).

Let me see if I can replicate this.  Sounds like a reportable bug so far.