Skip to content

Commit 3977b08

Browse files
authored
Remove all AppInsights code (#3389)
1 parent 70bf492 commit 3977b08

File tree

10 files changed

+0
-317
lines changed

10 files changed

+0
-317
lines changed

.github/workflows/weekly-stats.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/playground/src/getExample.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ export const getExampleSourceCode = async (prefix: string, lang: string, example
2525
code = code.split("\n").slice(1).join("\n").trim()
2626
}
2727

28-
// @ts-ignore
29-
window.appInsights &&
30-
// @ts-ignore
31-
window.appInsights.trackEvent({ name: "Read Playground Example", properties: { id: exampleID, lang } })
32-
3328
return {
3429
example,
3530
code,

packages/playground/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ export const setupPlayground = (
241241
// When any compiler flags are changed, trigger a potential change to the URL
242242
sandbox.setDidUpdateCompilerSettings(async () => {
243243
playgroundDebouncedMainFunction()
244-
// @ts-ignore
245-
window.appInsights && window.appInsights.trackEvent({ name: "Compiler Settings changed" })
246244

247245
const model = sandbox.editor.getModel()
248246
const plugin = getCurrentPlugin()

packages/playground/src/sidebar/plugins.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ export const addCustomPlugin = (mod: string) => {
2323
const newPlugins = customPlugins()
2424
newPlugins.push(mod)
2525
localStorage.setItem("custom-plugins-playground", JSON.stringify(newPlugins))
26-
// @ts-ignore
27-
window.appInsights &&
28-
// @ts-ignore
29-
window.appInsights.trackEvent({ name: "Added Custom Module", properties: { id: mod } })
3026
}
3127

3228
const customPlugins = (): string[] => {
@@ -147,10 +143,6 @@ export const optionsPlugin: PluginFactory = (i, utils) => {
147143
const ds = utils.createDesignSystem(div)
148144
ds.declareRestartRequired(i)
149145
if (input.checked) {
150-
// @ts-ignore
151-
window.appInsights &&
152-
// @ts-ignore
153-
window.appInsights.trackEvent({ name: "Added Registry Plugin", properties: { id: key } })
154146
localStorage.setItem(key, "true")
155147
} else {
156148
localStorage.removeItem(key)

packages/typescriptlang-org/gatsby-browser.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/typescriptlang-org/scripts/makeMarkdownForAppInsights.js

Lines changed: 0 additions & 150 deletions
This file was deleted.

packages/typescriptlang-org/scripts/updateAppInsightsGitHubIssue.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/typescriptlang-org/src/components/index/AboveTheFold.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ const Row = (props: { children: any, className?: string }) => <div className={[p
99
const Col = (props: { children: any, className?: string }) => <div className={[props.className, "col1"].join(" ")}>{props.children}</div>
1010
const Col2 = (props: { children: any }) => <div className="col2">{props.children}</div>
1111

12-
const event = (name: string, options?: any) => {
13-
// @ts-ignore
14-
window.appInsights &&
15-
// @ts-ignore
16-
window.appInsights.trackEvent({ name }, options)
17-
}
18-
1912
const FluidButton = (props: { href?: string, onClick?: any, title: string, subtitle?: string, icon: JSX.Element, className?: string }) => (
2013
<a className={"fluid-button " + props.className || ""} href={props.href} onClick={props.onClick}>
2114
<div>
@@ -36,7 +29,6 @@ export const AboveTheFold = () => {
3629
const onclick = (e) => {
3730
setShowCTALinks(true)
3831
e.preventDefault()
39-
event("Home Page CTA Started")
4032
return false
4133
}
4234

@@ -76,7 +68,6 @@ export const AboveTheFold = () => {
7668
title={i("index_2_cta_play")}
7769
subtitle={i("index_2_cta_play_subtitle")}
7870
href="/play"
79-
onClick={() => event("Home Page CTA Exited", { link: "playground" })}
8071
icon={
8172
<svg width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
8273
<g clipPath="url(#clip0)">
@@ -100,7 +91,6 @@ export const AboveTheFold = () => {
10091
title={i("index_2_cta_download")}
10192
subtitle={i("index_2_cta_download_subtitle")}
10293
href="/download"
103-
onClick={() => event("Home Page CTA Exited", { link: "download" })}
10494
icon={
10595
<svg width="15" height="27" viewBox="0 0 15 27" fill="none" xmlns="http://www.w3.org/2000/svg">
10696
<path d="M7.5 0.5V19M7.5 19L1 13M7.5 19L13 13" stroke="black" strokeWidth="1.5" />

packages/typescriptlang-org/src/templates/pages/cheatsheets.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const Index: React.FC<Props> = (props) => {
5656
title={i("cht_dl_title")}
5757
subtitle={i("cht_dl_subtitle")}
5858
href="/assets/typescript-cheat-sheets.zip"
59-
onClick={() => event("Downloaded Cheat Sheet Zip", { link: "download" })}
6059
icon={
6160
<svg width="15" height="27" viewBox="0 0 15 27" fill="none" xmlns="http://www.w3.org/2000/svg">
6261
<path d="M7.5 0.5V19M7.5 19L1 13M7.5 19L13 13" stroke="black" strokeWidth="1.5" />
@@ -70,13 +69,6 @@ const Index: React.FC<Props> = (props) => {
7069

7170
export default (props: Props) => <Intl locale={props.pageContext.lang}><Index {...props} /></Intl>
7271

73-
const event = (name: string, options?: any) => {
74-
// @ts-ignore
75-
window.appInsights &&
76-
// @ts-ignore
77-
window.appInsights.trackEvent({ name }, options)
78-
}
79-
8072
const FluidButton = (props: { href?: string, onClick?: any, title: string, subtitle?: string, icon: JSX.Element, className?: string }) => (
8173
<a className={"fluid-button " + props.className || ""} href={props.href} onClick={props.onClick}>
8274
<div>

0 commit comments

Comments
 (0)