diff --git a/package.json b/package.json index e5152879e2f..9897b90f1fe 100644 --- a/package.json +++ b/package.json @@ -235,7 +235,6 @@ "react-select-event": "5.5.1", "redux-mock-store": "1.5.5", "rimraf": "6.0.1", - "rudder-sdk-js": "2.48.44", "sass": "1.83.4", "sass-loader": "16.0.4", "smtp-tester": "^2.1.0", diff --git a/public/app/core/services/echo/backends/analytics/RudderstackBackend.ts b/public/app/core/services/echo/backends/analytics/RudderstackBackend.ts index c73b3788b11..5b3c6c97a03 100644 --- a/public/app/core/services/echo/backends/analytics/RudderstackBackend.ts +++ b/public/app/core/services/echo/backends/analytics/RudderstackBackend.ts @@ -1,5 +1,3 @@ -import type { apiOptions, identify, load, page, track } from 'rudder-sdk-js'; // SDK is loaded dynamically from config, so we only import types from the SDK package - import { BuildInfo, CurrentUserDTO } from '@grafana/data'; import { EchoBackend, @@ -12,11 +10,19 @@ import { import { loadScript } from '../../utils'; +type Properties = Record; + +interface RudderstackAPIOptions { + Intercom?: { + user_hash: string; + }; +} + interface Rudderstack { - identify: typeof identify; - load: typeof load; - page: typeof page; - track: typeof track; + identify: (identifier: string, traits: Properties, options?: RudderstackAPIOptions) => void; + load: (writeKey: string, dataPlaneURL: string, options: { configUrl?: string; destSDKBaseURL?: string }) => void; + page: () => void; + track: (eventName: string, properties?: Properties) => void; } declare global { @@ -76,7 +82,7 @@ export class RudderstackBackend implements EchoBackend