 = appEnvironment.ActivityIdLowerCaseNoHypens;
        const autoRefresh = "0";
        const deviceGroup = "unknown";
        let isFRE = "unknown";
        let isDHP = "unknown";
        const enableTrack = !(UrlUtility.getQueryParameterByName("enableTrack", locationHref) === "false");
        const search = new URLSearchParams(window.location.search);
        isDHP = search.get("startpage");
        isFRE = search.get("firstlaunch");
        let isMobile = "0";
        let isStaticPage = "False";
        if (headData && headData.ClientSettings) {
            const clientSettings = headData.ClientSettings;
            if (clientSettings.static_page === "true") {
                isStaticPage = "True";
            }
            isMobile = ((clientSettings.browser && clientSettings.browser.ismobile === "true") || clientSettings.deviceFormFactor === DeviceFormFactorType.Phone) ? "1" : "0";
        }
        // May need to trigger generation of an ActivityId if there's a production scenario
        // that doesn't provide one from PCS/FD. Currently the empty string fallback is believed
        // to only occur in local testing. Using headData to skip reformat of activityId.
        const flightId = (appEnvironment && appEnvironment.CurrentRequestTargetScope && appEnvironment.CurrentRequestTargetScope.pageExperiments) ? appEnvironment.CurrentRequestTargetScope.pageExperiments.join(",") : undefined;
        const telemetryProperties = Object.assign({ 
            // Properties from the current environment
            activityId: activityId, autoRefresh: autoRefresh, canvas: "Browser", channel: "anaheim", dDgk: deviceGroup, department: "antp", dImd: isMobile, domainId: "340", enable: enableTrack, environment: appEnvironment.Environment, flightid: flightId, isStaticPage: isStaticPage, isSignedIn: signedIn ? "True" : "False", localeCode: appEnvironment.CurrentMarket, msnocid: isDHP === "1" ? "msedgdhp" : "msedgntp", pageConfiguration: null, pageName: isFRE === "1" ? "FRE" : "default", pageProduct: "anaheim", pageTitle: window.document.title, pageType: isDHP === "1" || isFRE === "1" ? "dhp" : "ntp", pageUrl: window.document.URL, pageVersion: "15", serverImpressionGuid: activityId, storeocid: "anaheim_ntp", tmpl: "", vertical: "homepage", 
            // TODO: Add AFD logs once PCS send back the data.
            // Following the spec: https://microsoft.sharepoint.com/:w:/t/DataandInsights/EawMe8a0XKxCkuBO19CGARIByn5roly2qWG76ZElsQq5VQ?e=4PQyuM
            afd: "", waitForPageSettingsToUpdateTrack: true }, config);
        if ((flightId === null || flightId === void 0 ? void 0 : flightId.includes("prg-dhp-ntp")) &&
            window && window.chrome && window.chrome.ntpSettingsPrivate &&
            window.chrome.ntpSettingsPrivate.onPrerenderConversionFromDhpToNtp) {
            window.chrome.ntpSettingsPrivate.onPrerenderConversionFromDhpToNtp.addListener(() => {
                // Remove startpage=1 from URL
                const splitUrl = locationHref === null || locationHref === void 0 ?