Skip to main content
Franky_Ruyssch2
Level 4
Jul 8, 2021 12:41 PM UTC
Solved

Tracking email link clicked from custom loaded html

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.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Jul 8, 2021 1:23 PM UTC

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.

7 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Jul 8, 2021 1:23 PM UTC

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.

Translate
Franky_Ruyssch2
Level 4
Jul 12, 2021 9:44 AM UTC

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?

Translate
Franky Ruysschaert
SanfordWhiteman
User Group Leader
User Group Leader
Jul 12, 2021 1:35 PM UTC

That would be fine (would be tracked).

Translate