mirror of
https://github.com/hanzoai/insights-go.git
synced 2026-10-30 14:54:07 +00:00
Add support for passing device_id to the PostHog /flags endpoint. This allows clients to identify devices separately from users when evaluating feature flags. - Add DeviceId field to FlagsRequestData (omitted when nil) - Add DeviceId to FeatureFlagPayload and FeatureFlagPayloadNoKey - Thread device_id through all flag evaluation paths - Add tests verifying device_id is passed in request payload
20 lines
310 B
JSON
20 lines
310 B
JSON
{
|
|
"count": 1,
|
|
"flags": [
|
|
{
|
|
"id": 1,
|
|
"key": "device-bucket-flag",
|
|
"filters": {
|
|
"groups": [
|
|
{
|
|
"properties": [],
|
|
"rollout_percentage": 50
|
|
}
|
|
]
|
|
},
|
|
"bucketing_identifier": "device_id",
|
|
"active": true
|
|
}
|
|
]
|
|
}
|