Hi there.
After quickly reading about the OneTrust Cookie Auto-Blocking feature, their instructions suggest you can turn on this feature from the OneTrust Cookie settings, and the Auto-Blocking script will automatically be included in your main OneTrust Cookie script. Here is the article explaining this. Have you tried this already?
Could you please explain further why you need to add the AutoBlock script without using GTM? If it’s because GTM is being blocked by the Auto-Blocking script, there is another article here explaining how you can prevent Auto-Block from blocking GTM, specifically:
Auto-Blocking is capable of blocking Google Tag Manager. If this occurs, use one of the follow methods to unblock Google Tag Manager:
j.setAttributeNode(d.createAttribute(‘data-ot-ignore’));
j.setAttribute(‘class’,’optanon-category-C0001′);
If the above options with GTM don’t sound applicable, you could consider adding the script directly in your website head rather than through GTM.
You can add a script to your website head by either directly editing your theme’s header.php
file (where you should find your website’s <head>
tag), or by using a plugin such as Insert Headers and Footers. If you try this method, OneTrust suggests adding the script as close to the top of the <head>
section as possible.