Adding hidden fields (e.g. UTMs) to Marketo Dynamic Chat dialogues

They’ll tell you it can’t be done. But they didn’t count on the power of having no social life.

Parse “Visit Web Page” {{trigger.tokens}} into individual query params using FlowBoost

Together, the {{trigger.Web Page}} and {{trigger.Query Parameters}} tokens can recreate a visited URL. But parsing the URL into separate fields can’t be done natively: you need FlowBoost.

Be aware of decodeURIComponent() limitations (not only with Marketo forms, but with any 1ˢᵗ or 3ʳᵈ party JS)

You’re just one unencoded (or wrongly-encoded) query param away from a broken form. Scary, right?

Filling hidden fields from utm_* params on Squarespace forms

Every time I’m forced to dip into other form builders, I miss Marketo forms. Marketo’s are not only more programmer-friendly, they also do things out of the box that require custom JS elsewhere.

You’re probably overusing “&” in links

If a URL’s query params all start with “utm_”, no need to separate them with “&”. A simple “&” will do.

A simple way to output query param values in the page body

💡This code does not work in any version of Internet Explorer, as it relies on URLSeachParams and Custom Elements v1. An earlier post showed how to append form field values

Sure, multiple query params with the same name are allowed, and Auto-Fill acts accordingly... but what does “accordingly” mean?

A subtle mistake in a link sent to 100,000 people was about to wreak havoc on attribution. Here’s how we avoided that with an emergency JS intervention.

Use an established URL parser (I’ll say it again!)

It’s impossible to write a UTM parser without understanding how the wide world constructs (totally valid) URLs! The shorter the code, the more likely it misses tons of cases. So instead of some dude’s one- or two-liner, use a tested library.