@medusajs/analytics-local
Documentation | Website
Building blocks for digital commerce
Local Analytics Module Provider for Medusa: logs analytics track and identify calls to the Medusa logger at debug level instead of sending them to a third-party service. Use it in development to see which analytics events your application emits. It ships with @medusajs/medusa and is registered through the @medusajs/medusa/analytics-local path.
At a glance
| Package | @medusajs/analytics-local |
| Type | Module Provider (Analytics Module) |
| Provider ID | analytics-local |
| Registered by default | No |
| Import from | @medusajs/medusa/analytics-local |
Installation
No installation needed. The provider is a dependency of @medusajs/medusa.
Usage
Register the provider in the Analytics Module's providers array in medusa-config.ts. The Analytics Module accepts exactly one provider.
import { defineConfig } from "@medusajs/framework/utils"
module.exports = defineConfig({
// ...
modules: [
{
resolve: "@medusajs/medusa/analytics",
options: {
providers: [
{
resolve: "@medusajs/medusa/analytics-local",
id: "local",
},
],
},
},
],
})
Events are logged at the debug level, so set your log level accordingly to see them.
Configuration
The provider has no options.