A common form translation mistake, and how to avoid it using DOM Range

You can’t get away with setting textContent and innerHTML all the time. Sometimes you‘ve gotta bring the big stick: DOM Range.

You can’t HTML-encode {{my.tokens}} when they’re gonna appear in the Text part as-is

Another entry in the encoding-related guidebook to eliminate broken email links.

A less labor-intensive way to include emojis in the HTML part of Marketo emails

Updating my emoji techniques after a big break. Here’s a big improvement on the usual {{my.token}} method.

Detecting when people skip your preference center by using List-Unsubscribe

Mail clients that support the List-Unsubscribe header zap a hidden email back to Marketo, thus avoiding your preference center. Here’s how to detect that frustrating end-around.

When “technically valid” goes wrong: don’t put leading spaces in your Marketo hrefs, or you’ll lose click tracking

Leading and trailing spaces are totally valid in an HTML — they‘re automatically removed when the browser navigates to the final URL. But, standards notwithstanding, Marketo isn’t space-tolerant on the back end.

More oof-worthy Marketo Forms 2.0 code in the wild

Venting for a cause.

Set a Date field to the next anniversary of another Date using FlowBoost

Maintaining your leads’ Next Enrollment Anniversary, Next Warranty Renew Date, or just Next Birthday lets you run organized batch campaigns instead of (IMO) fragile triggers.

Only top-level, ‘var’-declared variables (or equivalent) are returned by FlowBoost

In the recent post on adding scores in FlowBoost [https://blog.teknkl.com/adding-multiple-score-fields-using-flowboost-with-some-extra-tricks/] I purposely left out the var statement when declaring variables to be returned: > I decided to