create a file and put it in the assets folder


i.e. for gtmniddocksdev.js


edit the theme.liquid file

and add

<script src="{{ 'gtmniddocksdev.js' | asset_url }}"></script>
just before </head>