How to insert Javascript before the closing </head> tag

I am trying to add a Mailerlite pop up form to a site. To do this I need to install a snippet of Javascript on every page of the website right before the closing tag.

However, I can’t figure out how to do this. I have tried a process of elimination and pasted the Javascript in seemingly all possible options but with no luck.

Any help would be much appreciated.

For entire site:

For specific page:

Example:

<script>
  console.log("hello");
  /* some code her */
</script>

In general you should read mailerlite docs:

Support:

1 Like