feat: Add an analytics module and local and posthog providers (#12505)
* feat: Add an analytics module and local and posthog providers * fix: Add tests and wire up in missing places * fix: Address feedback and add missing module typing * fix: Address feedback and add missing module typing --------- Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Adrien de Peretti
Oli Juhl
parent
52bd9f9a53
commit
b9a51e217d
+23
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
ProviderIdentifyAnalyticsEventDTO,
|
||||
ProviderTrackAnalyticsEventDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { AbstractAnalyticsProviderService } from "@medusajs/framework/utils"
|
||||
|
||||
export class AnalyticsProviderServiceFixtures extends AbstractAnalyticsProviderService {
|
||||
static identifier = "fixtures-analytics-provider"
|
||||
|
||||
async track(data: ProviderTrackAnalyticsEventDTO): Promise<void> {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
async identify(data: ProviderIdentifyAnalyticsEventDTO): Promise<void> {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
async shutdown(): Promise<void> {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
export const services = [AnalyticsProviderServiceFixtures]
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./default-provider"
|
||||
Reference in New Issue
Block a user