Plugins
Plugins are modular components that extend the Content SDK with specific functionality. Each plugin encapsulates a particular capability like events or personalization, and can declare dependencies on other plugins. Due to their modular nature, you can include the exact functionality you need. They’re type-safe with full TypeScript support and proper type inference. Plugins are also declarative providing clear dependency management between different plugins. See Initializing tracking, events, and personalization in the Content SDK for more information.
The interface for a plugin is as shown:
|
Field |
Description |
|---|---|
|
|
Name of the plugin. |
|
|
Options specific to the plugin. |
|
|
Plugins can declare dependencies on other plugins by using the dependencies field. This allows the SDK to ensure that required capabilities are present and initialized before a dependent plugin runs. |
|
|
Initialization function run once when |
|
|
Optional adapter used for specifying environment requirements explicitly in a type‑safe way. |
Available plugins
The following plugins and their corresponding capabilities are available out of the box:
|
Plugin |
Purpose |
Package |
|---|---|---|
|
|
It is required for the events and personalization plugins to function correctly. Provides core client ID handling a shared analytics initialization logic. When used on its own, you get stable visitor identification, but no event tracking or personalization. |
|
|
|
Adds the ability to track page view and/or custom events with the underlying client ID logic. |
|
|
|
Add support for personalization, enabled via the the personalization cookie, with optional web personalization. It relies on the base analytics plugin to handle visitor identification and cookie settings. The browser plugin should be used in client-side contexts, while the server plugin is suited for server components or a Next JS middleware/proxy context. |
|