title: Google Tag Manager, requirejs and the Aurelia CLI
body: <p>I have an <a href="http://aurelia.io/hub#/doc/article/aurelia/framework/latest/the-aurelia-cli" rel="nofollow noreferrer">Aurelia CLI</a> application into which I'm trying to include de <a href="https://www.google.com/analytics/tag-manager/" rel="nofollow noreferrer">Google Tag Manager</a> scripts</p>
  
  <pre><code>&lt;head&gt;
      &lt;!-- Google Tag Manager --&gt;
      &lt;!--&lt;script&gt;
          var dataLayer = [];
          dataLayer.push({ 'event': 'hixo' });
      &lt;/script&gt;
      &lt;script&gt;
          (function (w, d, s, l, i) {
              w[l] = w[l] || []; w[l].push({
                  'gtm.start':
                      new Date().getTime(), event: 'gtm.js'
              }); var f = d.getElementsByTagName(s)[0],
                      j = d.createElement(s), dl = l != 'dataLayer' ? '&amp;l=' + l : ''; j.async = true; j.src =
              'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
          })(window, document, 'script', 'dataLayer', 'GTM-PLSZRC');
      &lt;/script&gt;--&gt;
      &lt;!-- End Google Tag Manager --&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>But as soon as I start the application I get the following <code>requirejs</code> error:</p>
  
  <pre><code>"Mismatched anonymous define() modules"
  </code></pre>
  
  <p>The Aurelia CLI uses <code>requirejs</code>, but it is completely abstracted so, where and how should I define the Google Tag Manager Script so that it is not handled as an anonymous module?</p>