Remove GA
This commit is contained in:
+1
-3
@@ -59,11 +59,9 @@
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.4",
|
||||
"vite": "3.0.9",
|
||||
"vitest": "0.22.1",
|
||||
"vitest-svelte-kit": "0.0.7"
|
||||
"vitest": "0.22.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@analytics/google-analytics": "1.0.3",
|
||||
"@macfja/svelte-persistent-store": "1.3.0",
|
||||
"analytics": "0.8.1",
|
||||
"analytics-plugin-plausible": "^0.0.6",
|
||||
|
||||
+4
-11
@@ -6,20 +6,13 @@ export let analytics: AnalyticsInstance;
|
||||
export const initAnalytics = async (): Promise<void> => {
|
||||
if (browser && !analytics) {
|
||||
try {
|
||||
const { Analytics } = await import('analytics');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const googleAnalytics = (await import('@analytics/google-analytics')).default;
|
||||
const plausible = (await import('analytics-plugin-plausible')).default;
|
||||
const [{ Analytics }, { default: plausible }] = await Promise.all([
|
||||
import('analytics'),
|
||||
import('analytics-plugin-plausible')
|
||||
]);
|
||||
analytics = Analytics({
|
||||
app: 'mermaid-live-editor',
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
plugins: [
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
googleAnalytics({
|
||||
measurementIds: ['UA-153180559-1']
|
||||
}),
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
plausible({
|
||||
domain: 'mermaid.live',
|
||||
hashMode: false,
|
||||
|
||||
@@ -39,11 +39,6 @@
|
||||
dependencies:
|
||||
"@analytics/type-utils" "^0.6.0"
|
||||
|
||||
"@analytics/google-analytics@1.0.3":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@analytics/google-analytics/-/google-analytics-1.0.3.tgz#4b3966c4b5729ae65f909149b9f1a58ac42dc10f"
|
||||
integrity sha512-LnwefjQaqypjIXhw9GLRYpUz8dkriEC53JTLgJZ+mxSBZTkSrLSi3zuAiuV8rcsI0XfYmlWIav9RgGq92dWd4w==
|
||||
|
||||
"@analytics/localstorage-utils@^0.1.7", "@analytics/localstorage-utils@^0.1.8":
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/@analytics/localstorage-utils/-/localstorage-utils-0.1.8.tgz#eab6a9690ccd3c05d131e3a9788b4443affdb800"
|
||||
@@ -5087,11 +5082,6 @@ vite@3.0.9, "vite@^2.9.12 || ^3.0.0-0":
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
vitest-svelte-kit@0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/vitest-svelte-kit/-/vitest-svelte-kit-0.0.7.tgz#002b943a2946beffaadf20838ff0d950e8f861f3"
|
||||
integrity sha512-B83C14BAQEwNqTHcZ1dEV9EuCwOEKglcix32zBqRFonTmnc652JUOPJhMDAkQmOzHlA+SIXZ3FNEKiJjXyd1JA==
|
||||
|
||||
vitest@0.22.1:
|
||||
version "0.22.1"
|
||||
resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.22.1.tgz#3122e6024bf782ee9aca53034017af7adb009c32"
|
||||
|
||||
Reference in New Issue
Block a user