title: Run client-side script on NextJs
body: <p>I am trying to run a Mailchimp pop form script in my next.js application. And it seems the way next.js handles client-side scripts is causing errors to be thrown.</p>
  
  <p>When I include this script in the <code>&lt;Head&gt;</code> like so:</p>
  
  <pre><code>&lt;script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;window.dojoRequire(["mojo/signup-forms/Loader"], function (L) {L.start({ "baseUrl": "mc.us19.list-manage.com", "uuid": "xxxxxxxxxxx", "lid": "xxxxx", "uniqueMethods": true })})&lt;/script&gt;
  </code></pre>
  
  <p>I get an error that </p>
  
  <blockquote>
    <p>"L" is not defined</p>
  </blockquote>
  
  <p>When I wrap the content of the second script with a parenthesis like so:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;{window.dojoRequire(["mojo/signup-forms/Loader"], function (L) {L.start({ "baseUrl": "mc.us19.list-manage.com", "uuid": "xxxxxxxxxx", "lid": "xxxxx", "uniqueMethods": true })})}&lt;/script&gt;
  </code></pre>
  
  <p>I get this error: </p>
  
  <blockquote>
    <p>"dojoRequire" is not a function</p>
  </blockquote>
  
  <p>I have tried using react-helmet, but this had no effect. Some guidance would be extremely appreciated.</p>