Skip to content
Last updated

Segment Analytics

Integrate Segment Analytics into Redocly project.

With the consent option on, this integration loads only while the consent state allows the analytics category. In opt-in mode the visitor must accept first. In opt-out mode the category starts on and stays on until the visitor refuses.

Configuration

OptionTypeDescription
writeKeystringREQUIRED. Amplitude write key
includeInDevelopmentbooleanSet this option to true to enable Segment Analytics in development mode and preview builds. Default: false.
trackPagebooleanSet this option to true to track page visits. Default: false.
includeTitleInPageCallbooleanSet this option to true to include the page title in page view events. Default: false.
hoststringSet this if you need to proxy events through a custom endpoint

Example

analytics:
  segment:
    includeInDevelopment: true
    writeKey: my-write-key
    trackPage: true
    includeTitleInPageCall: true
    host: https://my-custom-host.com

Resources