OneTrust script not loaded - missing document.write support?


we’re using OneTrust for consent management and want to display the consent banner via Matomo Tag Manager. Currently, we’re using Google Tag Manager, but want to switch to MTM.

With GTM, we can display the consent banner by using a custom html tag with the setting “support document.write”. In MTM, I can’t find a setting for supporting document.write.
Problem at the moment: the consent banner won’t be displayed via MTM.

We see this error message in the browser console:
Failed to load resource: the server responded with a status of 404 () (in

The OneTrust support insists that support “document.write” needs to be selected with GTM. But they have no experience with MTM.

Is there a possibility to change setting for “support document.write” in a custom html tag?
Or might it be another problem that is not connected to the support of document.write?

Thanks a lot for your help!