Hubspot and OneTrust Cookie Banner

Does anyone know how to disable the OneTrust cookie banner popup when editing pages in production or staging without disrupting it on the live site?

Hey @TDouglas looks like this is what you’re looking for! You can wrap the onetrust embed code in this script to prevent it loading inside the CMS editor.

https://community.hubspot.com/t5/CMS-Development/Preventing-JS-from-loading-in-the-Page-Editor/m-p/295776/highlight/true#M13886