Question
Does Segment Analytics.js automatically collect and send IPv6 addresses?
Product
Segment
Environment
Segment Console
Answer
Analytics.js does not automatically collect IPv6 addresses. Only IPv4 addresses are collected by default. To include an IPv6 address, it must be manually captured in your application and passed to Segment using the context.ip field for each event.
Here’s an example:
analytics.track("Order Completed", {}, { context: { ip: "0.0.0.0" }});
Additional Information
If the context.ip field is not provided, Segment will default to collecting only IPv4 addresses.