Files
insights-go/fixtures/feature_flag/test-device-id-bucketing.json
AndersandGitHub 227dc9bb39 feat: Add device_id parameter to /flags requests (#157)
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
2026-02-04 14:30:37 +01:00

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
}
]
}