UNPKG

@openshift-console/dynamic-plugin-sdk-internal

Version:
21 lines (20 loc) 622 B
/** * Allows integration with Console specific Segment Analytics instance. * * This API is meant to be used by Red Hat plugins only. * * Console application takes care of loading the analytics.min.js script. * * @example * ```ts * const { analytics, analyticsEnabled } = getSegmentAnalytics(); * * if (analyticsEnabled) { * // invoke methods on analytics object as needed * } * ``` * * @see https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/ */ export const getSegmentAnalytics = require('@console/dynamic-plugin-sdk/src/api/segment-analytics') .getSegmentAnalytics;