Last updated

Amplitude Analytics

Integrate Amplitude Analytics into Redocly portal to track page views and outbound link clicks

Configuration

OptionTypeDescription
apiKeystringREQUIRED. Amplitude project API key
includeInDevelopmentbooleanSet this option to true to enable Amplitude Analytics in development mode and preview builds. Default is false.
headbooleanPut tracking scripts in the head tag instead of body
exclude[string]Do not send page view events on certain pages
pageViewEventNameStringSet this option to change the event name for page views. Default is pageView.
outboundClickEventNameStringSet this option to change the event name for outbound link clicks. Default is outboundLinkClick.
amplitudeConfigAmplitude JS SDK optionsAmplitude SDK init options as described in Amplitude docs

Example

analytics:
  amplitude:
    includeInDevelopment: true
    apiKey: my-api-key
    head: true
    respectDNT: true
    exclude:
      - /private-docs/**
    outboundClickEventName: linkClick
    pageViewEventName: routeChange
    amplitudeConfig:
      batchEvents: true
      includeReferrer: true