title: Javascript Compiler Error in Google Tag Manager: this language feature is only supported for ECMASCRIPT6 mode or better
body: <p>I'm getting the following error message in Google Tag Manager:</p>
  
  <blockquote>
    <p>Error at line 6, character 282: this language feature is only supported for ECMASCRIPT6 mode or better: block-scoped function declaration. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT or higher to enable ES6 features.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/Jxq0H.png" rel="nofollow noreferrer">when adding this Intercom snippet tag</a></p>
  
  <pre><code>&lt;script&gt;
      window.intercomSettings = { app_id: {{intercom_chat_widget_id}} };
  &lt;/script&gt;
  
  &lt;script&gt;
      (function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', intercomSettings); } else { var d = document; var i = function () { i.c(arguments) }; i.q = []; i.c = function (args) { i.q.push(args) }; w.Intercom = i; function l() { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/{{intercom_chat_widget_id}}'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })()
  &lt;/script&gt;
  </code></pre>
  
  <p>For this section of the code <code>i = function () {</code></p>