title: Does next/script module's <Script> tag supports dangerouslySetInnerHTML?
body: <p>I was working on Next.js based codebase we recently migrated to most updated version of nextjs 11.x. For the sake of core web vitals my job is to update the old script tags (Simple HTML/JSX) to the next/scripts module <code>&lt;Script&gt;</code> component the old stack uses tag manager by using <code>dangerouslySetInnerHTML</code>. how to use next/script tag and achieve the same output.</p>
  <pre><code>      &lt;script
          // eslint-disable-next-line react/no-danger
          dangerouslySetInnerHTML={{
            __html: `(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-******');`
          }}
        &gt;&lt;/script&gt;
  </code></pre>