Skip to content

Commit 2b142ae

Browse files
committed
Telemetry settings
1 parent 38b60a6 commit 2b142ae

5 files changed

Lines changed: 37 additions & 32 deletions

File tree

.old-jekyll/_includes/production-telemetry-head.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/components/CommunityResources.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ const COMMUNITY_RESOURCES: Resource[] = [
2020
url: "/cla",
2121
},
2222
{
23-
title: "Third-Party Disclosures",
23+
title: "Third-Party Source Disclosures",
2424
url: "https://3rdpartysource.microsoft.com/",
2525
},
2626
{
2727
title: "Microsoft's Open Source Program",
2828
url: "/program/",
2929
},
30-
{
31-
title: "Azure Credits",
32-
url: "/azure-credits",
33-
},
3430
];
3531

3632
export default function CommunityResources() {

src/app/ecosystem/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ export default function Ecosystem() {
7777
<div className="col-md-6 pl-md-4 col-lg-4">
7878
<p>
7979
Microsoft is proud to support amazing <a href="#fossfund">open source projects</a>, <a
80-
href="#foundations">initiatives, and foundations</a>,
81-
to offer <a
82-
href="#credits">Azure credits</a> to open source projects,
83-
and to make <a
80+
href="#foundations">initiatives, and foundations</a>, making <a
8481
href="#contributions">upstream contributions</a> to thousands of open source projects on GitHub and beyond.
8582
</p>
8683
<p>

src/components/Footer.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,18 @@ export default function Footer() {
111111
</li>
112112
<li id="manageCookies" data-require-javascript="yes" data-javascript-show="immediate">
113113
<a href="#" onClick={() => {
114-
// manageCookies()
115-
// TODO: implement manageCookies function
116-
}}>Manage Cookies</a>
114+
try {
115+
if ((window as any).manageCookies) {
116+
(window as any).manageCookies();
117+
}
118+
} catch (e) {
119+
console.error('Error managing cookies:', e);
120+
}
121+
}
122+
}
123+
>
124+
Manage Cookies
125+
</a>
117126
</li>
118127
<li>
119128
<a href="https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx" target="_blank">Terms</a>

src/components/TelemetryHead.tsx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,26 @@
33
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
//
55

6-
export default function TelemetryHead() {
7-
return (
8-
<>
9-
{/* This was the production-telemetry-head.html include */}
10-
<script
11-
dangerouslySetInnerHTML={{
12-
__html: `
13-
var appInsights=window.appInsights||function(a){
14-
function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c
15-
}({
16-
instrumentationKey: "38a7ce38-8ac5-429e-a25c-39394d464e62"
17-
});
18-
window.appInsights=appInsights,appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();
19-
`
20-
}}
21-
/>
22-
</>
23-
)
24-
}
6+
const IS_APP_INSIGHTS_ENABLED = false;
7+
8+
export default function TelemetryHead() {
9+
return <script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script>;
10+
11+
// return IS_APP_INSIGHTS_ENABLED ? (
12+
// <>
13+
// {/* This was the production-telemetry-head.html include */}
14+
// <script
15+
// dangerouslySetInnerHTML={{
16+
// __html: `
17+
// var appInsights=window.appInsights||function(a){
18+
// function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c
19+
// }({
20+
// instrumentationKey: "38a7ce38-8ac5-429e-a25c-39394d464e62"
21+
// });
22+
// window.appInsights=appInsights,appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();
23+
// `
24+
// }}
25+
// />
26+
// </>
27+
// ) : <></>;
28+
}

0 commit comments

Comments
 (0)