I am unable to remove default itemtypes and itemtypes from DOM page using google tag manager.
How to remove itemtype and itemscope from above body tag using javascript in google tag manager?
2
You can use Element.removeAttribute() method to remove your desired attributes from an element. In this case you can do something like this:
document.body.removeAttribute("itemtype"); document.body.removeAttribute("itemscope");
This can be done by adding this Custom HTML Tag in google tag manager:
<script> var body = document.getElementsByTagName('body')[0]; body.removeAttribute("itemtype"); body.removeAttribute("itemscope"); </script>
Click here to cancel reply.
2
Answers
You can use Element.removeAttribute() method to remove your desired attributes from an element. In this case you can do something like this:
This can be done by adding this Custom HTML Tag in google tag manager: