@twilio/flex-ui-telemetry
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

Flex Telemetry SDK for UI

Overview

This package is a light-weight wrapper on Segment Analytics SDK combined with the integration of the iframe implementation in Hosted Flex to overcome the challenge of having multiple Segment Analytics instances on a single browser window.

⚠️ Important Note:

  • This package is for Twilio internal use only and is not officially supported.

  • This package works only inside the Flex UI window where the iframe with the Segment AnalyticsJS + custom JS snippets exist which helps isolate the Flex Segment Analytics instance.

Usage

Installation

npm install @twilio/flex-ui-telemetry

Initialising the SDK

import FlexTelemetry from '@twilio/flex-ui-telemetry'
 
const analytics = new FlexTelemetry({
    // common properties that you need to send with every event
    // override the existing common properties that is supported by the sdk
    pluginVersion: '1.0.0',
    pluginName: 'plib-dialpad-conference-addon'
});

Page

analytics.page("Plugin Library Home", pageProperties, segmentOptions, callBack);

Track

analytics.track("Plugin Installation Start", eventProperties, segmentOptions, callBack);

Identify

analytics.identify(userId, traits, segmentOptions, callBack);

Group

analytics.group(groupId, traits, segmentOptions, callBack);

Readme

Keywords

none

Package Sidebar

Install

npm i @twilio/flex-ui-telemetry

Weekly Downloads

4,381

Version

1.3.1

License

Apache-2.0

Unpacked Size

57.8 kB

Total Files

36

Last publish

Collaborators

  • flex-runtime