Skip to content

Commit c822295

Browse files
committed
chore: drop Google Analytics 3
1 parent 62b18b9 commit c822295

File tree

8 files changed

+4
-80
lines changed

8 files changed

+4
-80
lines changed

src/config/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
import * as React from "react";
22
import ReactDOM from "react-dom";
3-
import "../utils/gaInit";
43
import Root from "./components/Root";
54
import store from "./store";
65

7-
ga("create", "UA-81509238-9", {
8-
cookieFlags: "max-age=7200;secure;samesite=none",
9-
});
10-
ga("set", "anonymizeIp", true);
11-
ga("send", "pageview", "/config.html");
12-
136
const rootElement = document.getElementById("root");
147
ReactDOM.render(<Root store={store} />, rootElement);

src/utils/ga.ts

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

src/utils/gaInit.js

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

src/viewer/Entity.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,6 @@ class Entity extends React.Component<Props & CardsProps, State> {
7171
if (prevState.isHovering && !this.state.isHovering) {
7272
this.setState({ isMeaningfulHover: false });
7373
}
74-
if (
75-
this.state.isHovering &&
76-
!prevState.isMeaningfulHover &&
77-
this.state.isMeaningfulHover
78-
) {
79-
if (this.props.dbfId) {
80-
ga("send", "event", "Overlay", "Hover Card", String(this.props.dbfId));
81-
} else {
82-
ga("send", "event", "Overlay", "Hover Card");
83-
}
84-
}
8574
}
8675

8776
public componentWillUnmount(): void {

src/viewer/mobile/Panel.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,11 @@ import {
77
BoardStatePlayer,
88
EBSConfiguration,
99
} from "../../twitch-hdt";
10-
import {
11-
Feature,
12-
hasFeature,
13-
OverlayPosition,
14-
WhenToShowBobsBuddy,
15-
} from "../../utils/config";
10+
import { Feature, hasFeature, WhenToShowBobsBuddy } from "../../utils/config";
1611
import { PortalProvider } from "../../utils/portal";
1712
import { TwitchExtProps, withTwitchExt } from "../../utils/twitch";
18-
import CopyDeckButton, {
19-
CopyDeckButtonChild,
20-
CopyDeckButtonChildProps,
21-
} from "../CopyDeckButton";
22-
import { CopyDeckIcon, HSReplayNetIcon } from "../icons";
13+
import CopyDeckButton, { CopyDeckButtonChildProps } from "../CopyDeckButton";
14+
import { HSReplayNetIcon } from "../icons";
2315
import BobsBuddy from "../overlay/BobsBuddy";
2416
import { TooltipBehaviour, TooltipProvider } from "../utils/tooltips";
2517
import CardList from "./CardList";
@@ -357,10 +349,6 @@ class Panel extends React.Component<Props & TwitchExtProps, State> {
357349
this.setState({ timedOut: true });
358350
}, 30 * 1000);
359351
}
360-
361-
private onCopy = () => {
362-
ga("send", "event", "Deck", "Copy", "Mobile");
363-
};
364352
}
365353

366354
export default withTwitchExt(Panel);

src/viewer/mobile/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@ import {
44
CardsProvider,
55
getHearthstoneLocaleFromTwitchLocale,
66
} from "../../utils/cards";
7-
import "../../utils/gaInit";
87
import {
98
TwitchExtConsumer,
109
TwitchExtConsumerArgs,
1110
TwitchExtProvider,
1211
} from "../../utils/twitch";
1312
import Root from "./Root";
1413

15-
ga("create", "UA-81509238-9", {
16-
cookieFlags: "max-age=7200;secure;samesite=none",
17-
});
18-
ga("set", "anonymizeIp", true);
19-
ga("send", "pageview", "/mobile.html");
20-
2114
const rootElement = document.getElementById("root");
2215
ReactDOM.render(
2316
<TwitchExtProvider>

src/viewer/overlay/DeckList.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class DeckList extends React.Component<
259259
position={this.props.position}
260260
>
261261
<li>
262-
<CopyDeckButton deck={this.props.deck} onCopy={DeckList.onCopy}>
262+
<CopyDeckButton deck={this.props.deck}>
263263
{({
264264
disabled,
265265
copied,
@@ -312,7 +312,6 @@ class DeckList extends React.Component<
312312
) {
313313
e.currentTarget.blur();
314314
}
315-
ga("send", "event", "Deck", "Hide");
316315
}}
317316
onMouseDown={this.stopPropagation}
318317
title="Automatically hide deck list"
@@ -331,7 +330,6 @@ class DeckList extends React.Component<
331330
if (target && typeof target.blur === "function") {
332331
target.blur();
333332
}
334-
ga("send", "event", "Deck", "Show");
335333
}}
336334
onMouseDown={this.stopPropagation}
337335
title="Keep deck list visible"
@@ -392,10 +390,6 @@ class DeckList extends React.Component<
392390
return;
393391
}
394392
}
395-
396-
private static onCopy() {
397-
ga("send", "event", "Deck", "Copy", "Overlay");
398-
}
399393
}
400394

401395
export default withTwitchExt(withCards(DeckList));

src/viewer/overlay/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@ import {
44
CardsProvider,
55
getHearthstoneLocaleFromTwitchLocale,
66
} from "../../utils/cards";
7-
import "../../utils/gaInit";
87
import {
98
TwitchExtConsumer,
109
TwitchExtConsumerArgs,
1110
TwitchExtProvider,
1211
} from "../../utils/twitch";
1312
import Root from "./Root";
1413

15-
ga("create", "UA-81509238-9", {
16-
cookieFlags: "max-age=7200;secure;samesite=none",
17-
});
18-
ga("set", "anonymizeIp", true);
19-
ga("send", "pageview", "/overlay.html");
20-
2114
const rootElement = document.getElementById("root");
2215
ReactDOM.render(
2316
<TwitchExtProvider>

0 commit comments

Comments
 (0)