HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.vdk/plugins/TagManager/Template/Variable/PreConfigured/FirstDirectoryVariable.web.js
(function () {
    return function (parameters, TagManager) {

        this.get = function () {
            var pathname = parameters.window.location.pathname;
            if (!pathname || pathname === '/') {
                return null;
            }

            pathname = String(pathname).substr(1);
            var posFirstPath = String(pathname).indexOf('/');
            if (posFirstPath === -1) {
                return pathname; // no trailing slash
            }
            return pathname.substr(0, posFirstPath);
        };
    };
})();