We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 547b994 commit 8d2ec45Copy full SHA for 8d2ec45
1 file changed
packages/vue/src/utils.ts
@@ -1,3 +1,4 @@
1
+import { SUPPORTED_ANALYTICS_PLATFORMS } from '@web-analytics/core'
2
import type { Platform } from '@web-analytics/core'
3
import type { VueInstance } from './types'
4
@@ -12,17 +13,6 @@ export function getMajorVersion({ version }: VueInstance) {
12
13
}
14
15
export function getGlobalProperty(platform: Platform) {
- switch (platform) {
16
- case 'baidu': {
17
- return 'baiduAnalytics'
18
- }
19
-
20
- case 'cnzz': {
21
- return 'cnzzAnalytics'
22
23
24
- default: {
25
- return ''
26
27
+ if (!SUPPORTED_ANALYTICS_PLATFORMS.includes(platform)) return ''
+ return `$${platform}Analytics`
28
0 commit comments