Tracking email link clicked from custom loaded html | Community
Skip to main content
Franky_Ruyssch2
New Participant
July 8, 2021
Solved

Tracking email link clicked from custom loaded html

  • July 8, 2021
  • 1 reply
  • 4140 views

Via an external tool I render html for each contact part of a certain campaign. ( Done with Google Sheets )

That html is loaded into a lead field in marketo ( via a list import ). Part of the html is a link ( in fact several links , simple <a href="XXX">).

That lead field ( with the html ) is used inside an email via {{lead.xxx}}.


Hoe can I track 'link clicked events' on these link(s). It seems that by default the link clicks are not captured.

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 SanfordWhiteman

You‘d need to re-output the HTML using Velocity. Very much like https://nation.marketo.com/t5/product-blogs/creating-trackable-links-even-when-a-token-includes-http-or/ba-p/314510 except (and this won’t be particularly fun, since Marketo no longer supports the XML/XHTML parser in Velocity) you need to parse out the links.

 

While it’s doable, even as a Velocity expert, I would shy away from this. I’d pass the HTML to a webhook that parses it into a JSON block (Editor.js-style) representing the different HTML elements and write that back to the field. That will make the Velocity more reasonable.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
July 8, 2021

You‘d need to re-output the HTML using Velocity. Very much like https://nation.marketo.com/t5/product-blogs/creating-trackable-links-even-when-a-token-includes-http-or/ba-p/314510 except (and this won’t be particularly fun, since Marketo no longer supports the XML/XHTML parser in Velocity) you need to parse out the links.

 

While it’s doable, even as a Velocity expert, I would shy away from this. I’d pass the HTML to a webhook that parses it into a JSON block (Editor.js-style) representing the different HTML elements and write that back to the field. That will make the Velocity more reasonable.

Franky_Ruyssch2
New Participant
July 12, 2021

If the lead field with the (outside marketo ) generated URL would contain something like "domain/my-landing-page.html", note the absence of http:// or https://

and I would output this like

<a href="http://{{lead.fieldname}}">XXX</a>

Would I need any velocity here? And will the link be tracked?

Franky Ruysschaert
SanfordWhiteman
New Participant
July 12, 2021

That would be fine (would be tracked).