How to use WOVN ignore with Google Tag Manager

Setup

  1. Log into Google Tag Manager.
  2. Click on “Tag”.
  3. Click on “New”, then on “Set tag”. Select “Custom HTML” from the tag types.
  4. Paste the following code snippet in the “Custom HTML”.
    <script>
    (function() {
    var classesToIgnore = [‘.exampleClass’, ‘.exampleClass2’, ‘exampleClass3’]classesToIgnore.forEach(function(className) {
    var el = document.querySelector(className);
    el.setAttribute(‘wovn-ignore’,”);
    })
    })();
    </script>
  5. Check that document.write. is supported.
  6. Select the trigger.
  7. Save and Publish.