Skip to main content

AnalyticsContext()

Home > @backstage/core-plugin-api > AnalyticsContext

Provides components in the child react tree an Analytics Context, ensuring all analytics events captured within the context have relevant attributes.

Signature:

AnalyticsContext: (options: {
attributes: Partial<AnalyticsContextValue>;
children: ReactNode;
}) => React.JSX.Element

Parameters

Parameter

Type

Description

options

{ attributes: Partial<AnalyticsContextValue>; children: ReactNode; }

**Returns:**

React.JSX.Element

Remarks

Analytics contexts are additive, meaning the context ultimately emitted with an event is the combination of all contexts in the parent tree.