platform/dev/prod/src/analytics.ts
Andrey Sobolev ddecae80dd
Move services to public ()
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2024-07-28 14:55:43 +07:00

20 lines
639 B
TypeScript

//
// Copyright © 2024 Hardcore Engineering Inc
//
import { AnalyticProvider, Analytics } from "@hcengineering/analytics"
import { SentryAnalyticProvider } from "./analytics/sentry"
import { Config } from "./platform"
import { PosthogAnalyticProvider } from "./analytics/posthog"
import { AnalyticsCollectorProvider } from './analytics/analyticsCollector'
export function configureAnalytics (config: Config) {
const providers: AnalyticProvider[] = [
new SentryAnalyticProvider,
new PosthogAnalyticProvider,
new AnalyticsCollectorProvider
]
for (const provider of providers) {
Analytics.init(provider, config)
}
}