Thanks for these questions, Justin. And for the extraordinary detail, you continue to provide fantastic reflections of this process and it seems apt to explain the flow in which this is embedded.
We have (1) an Artable form with a rich text field that collects the contents of an email to be sent, (2) a zap that converts that rich text to HTML, and (3) this intended formula for adding a UTM code to each URL within the submitted text (the number of URLs per message varies greatly).
For us, the most important element of the UTM is the term= (adding what’s between ">TEXT</a>
to the end of the UTM) as this is what shows up in our real-time viewer.
For example, this HTML with two URLs:
<p>Let's sync at <a href="https://mythos.one/brianswichkow/7f2fd4">Cooperative Currency</a>.</p><p><a href="https://mythos.one/brianswichkow/0b480c">John Zdanowski</a> is hosting the space at 3:45 PM today.</p>
Would become this HTML with UTMs added to each:
<p>Let's sync at <a href="https://mythos.one/brianswichkow/7f2fd4?utm_source=BrianPlus&utm_medium=Email&utm_campaign=One%20Gathering&utm_term=Cooperative%20Currency">Cooperative Currency</a>.</p><p><a href="https://mythos.one/brianswichkow/0b480c?utm_source=BrianPlus&utm_medium=Email&utm_campaign=One%20Gathering&utm_term=John%20Zdanowski">📝John Zdanowski</a> is hosting the space at 3:45 PM today.</p>
We do this elsewhere. At present, I’m not seeing how to (a) multiple links of an unknown quantity from the source text or HTML and (b) add the term= field of the UTM using the linked text.
Turning
">THIS TEXT</a>
Into
&utm_term=THIS%20TEXT">THIS TEXT</a>
Thank you so much again for your help.
~Brian