Analytics & integrationsSegmentAsk a question|Copy page|View as Markdown|More actionsIntegrate Segment to collect analytics and route user data to your preferred analytics destinations. 1Get your Segment writeKeyIn your Segment workspace, navigate to your Source, then go to Settings > API Keys and copy the Write Key.2Add Segment to docs.ymlIn your docs.yml file, add the Segment writeKey:docs.yml1analytics:2 segment:3 write-key: ${SEGMENT_WRITE_KEY} # scans environment variable