Chapter 4. Customizing Segment source


The analytics-provider-segment plugin sends the collected web analytics data to Red Hat by default. However, you can configure a new Segment source that receives web analytics data based on your needs. For configuration, you need a unique Segment write key that points to the Segment source.

Note

Create your own web analytics data collection notice for your application users.

4.1. Customizing Segment source using the Operator

You can configure integration with your Segment source by using the Red Hat Developer Hub Operator.

Prerequisites

  • You have logged in as an administrator in the OpenShift Container Platform web console.
  • You have installed Red Hat Developer Hub on OpenShift Container Platform using the Operator.

Procedure

  1. Add the following YAML code in your Backstage custom resource (CR):

    # ...
    spec:
      application:
        extraEnvs:
          envs:
            - name: SEGMENT_WRITE_KEY
              value: <segment_key> 
    1
    
    # ...
    Copy to Clipboard Toggle word wrap
    1
    Replace <segment_key> with a unique identifier for your Segment source.
  2. Save the configuration changes.

You can configure integration with your Segment source by using the Red Hat Developer Hub Helm Chart.

Prerequisites

  • You have logged in as an administrator in the OpenShift Container Platform web console.
  • You have installed Red Hat Developer Hub on OpenShift Container Platform using the Helm Chart.

Procedure

  1. In the Developer perspective of the OpenShift Container Platform web console, go to the Helm view to see the list of Helm releases.
  2. Click the overflow menu on the Helm release that you want to use and select Upgrade.
  3. Use either the Form view or YAML view to edit the Helm configuration:

    • Using Form view

      1. Expand Root Schema Backstage Chart Schema Backstage Parameters Backstage container environment variables.
      2. Click the Add Backstage container environment variables link.
      3. Enter the name and value of the Segment key.

      4. Click Upgrade.
    • Using YAML view

      1. Add the following YAML code in your Helm configuration file:

        # ...
        upstream:
          backstage:
            extraEnvVars:
              - name: SEGMENT_WRITE_KEY
                value: <segment_key> 
        1
        
        # ...
        Copy to Clipboard Toggle word wrap
        1
        Replace <segment_key> with a unique identifier for your Segment source.
      2. Click Upgrade.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat