LoginLdap with Windows authentication on IIS

Hi!
We are using Matomo as an on prem installation on a Windows server. Our clients want to login using Windows authentication and that works just fine. The only problem is that the js file under /js/container_xxxxxx.js cannot be accessed from the site collecting data with logging in.

The snippet is like this:

    <script type="text/javascript">
        var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='http://server/js/container_rLFiMB1X.js'; s.parentNode.insertBefore(g,s);
    </script>

If I remove Anonymous authentication the snippet requiers login and that we don’t want. I have tried to enable Anonymous authentication on the js folder and files but I still get the login prompt when accessing the site.

How can we solve this?
Thanks!

/Kristoffer

Hi @Mbooh
Can you check in the browser network log which request needs the authentication? It can be the MTM container, the page view tracking, or event the Heatmap / SessionRecording configuration in case of activation of this plugin…

Hi, found the solution and I needed a host header to make it work.
From the start we had no host header and accessed the server by http://servername. Adding a host header made the anonomous work on the js folder. Some other things came up like the scheduled archived task did not work. That I fixed by creating an index-archive.php and made that file accessable anonymous.

/Kristoffer