title: Send event when module was executed
body: <p>I'm really stuck on this.. I need to send an event when both <strong>Load module</strong> and <strong>Hide module</strong> code was executed, and only then send the event. Ideas on how to achieve this?</p>
  <p><strong>// Load module</strong></p>
  <pre><code>(
      function() {
          var s=document.createElement('script');
          s.type='text/javascript';
          s.async=true;
          s.src='https://example.com/bundles.js';
          var x = document.getElementsByTagName('script')[0];
          x.parentNode.insertBefore(s, x);
      }
  )();
  </code></pre>
  <p><strong>// Hide module</strong></p>
  <pre><code>var inverval = setInterval(hideClass, 100);
  
  function hideClass () {
      if ($(&quot;.class&quot;).hide().length &gt; 0) clearInterval(inverval);
  }
  </code></pre>
  <p><strong>// When both happend = Send a event to Google Analytics</strong></p>
  <pre><code>DigitalData.push({'event':Module, 'eventLabel':'Page'});
  </code></pre>