As Community user GFpoints out, anti-cookie/anti-tracking legislation like GDPR requires a combo of these earlier approaches:

the end user must consent before Munchkin runs on Marketo LPs

you need to preserve the LP-specific special options if they do consent

you may need to add custom options, most often domainLevel

To get this working, we need to hack around Munchkin's hard-coded load-and-run logic on Marketo LPs. Luckily, it's not horrendously complex, though it'll look obscure to people inexperienced with such shenanigans.☺

Here are the scripts to put as high up in your page as possible (in <head> ideally, but near the top of <body> is fine too, like you get with an HTML element on a Free-Form LP):

Notice I'm not passing any args to the function in the basic usage example above, there's just a comment:

...( /* custom init options here if necessary */ )`

If you need custom Munchkin initialization options (most commonly domainLevel) then pass those in an object:

...( {domainLevel: 2, someOtherOption: true} )

What does it do?

The code works by caching the Munchkin config for later — including both Marketo's special options and your custom options — while stopping the page from immediately runningMunchkin.init().

You can see the cached config in the browser console:

This gives you complete control. Once someone opts in to being tracked, then run Munchkin.init() manually (call it with no arguments, since all the arguments, including the 123-ABC-456 Munchkin ID, are already stored).