Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4500

Add getSegmentAnalytics function to Console plugin API

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • None
    • OCP Console - Sprint 275

      Console dynamic plugins may want to use Segment analytics library for telemetry purposes.

      See Console operator telemetry ConfigMap - Segment analytics metadata is passed to Console frontend via SERVER_FLAGS global.

      We should update Console code to take care of loading the analytics.min.js script as well as exposing getSegmentAnalytics function to its plugins, providing access to Segment API methods on the analytics object.

      This way, Console plugins don't have to deal with initializing Segment Analytics on their own, but instead use the newly exposed function.

      We should also consider documenting which specific version of Segment analytics JavaScript library is currently hosted via console.redhat.com/connections/cdn domain and ensure that we use the proper Segment npm package and TS types.

       

      AC:

      • Console handles the loading the analytics.min.js script
      • Console exposes getSegmentAnalytics function to its plugins

              vszocs@redhat.com Vojtech Szocs
              vszocs@redhat.com Vojtech Szocs
              None
              None
              Yanping Zhang Yanping Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: