Skip to content

Instantly share code, notes, and snippets.

@SaraVieira
Created July 3, 2023 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaraVieira/17a5c81a5ed1334ba40313ca2c985197 to your computer and use it in GitHub Desktop.
Save SaraVieira/17a5c81a5ed1334ba40313ca2c985197 to your computer and use it in GitHub Desktop.
{"schemaVersion":"1","revision":"0.32.0","attributes":[{"key":"country","type":"string"},{"key":"date","type":"string"},{"key":"device","type":"string"},{"key":"userId","type":"string","capture":true}],"segments":[{"key":"blackFridayWeekend","conditions":"{\"and\":[{\"attribute\":\"date\",\"operator\":\"after\",\"value\":\"2023-11-24T00:00:00.000Z\"},{\"attribute\":\"date\",\"operator\":\"before\",\"value\":\"2023-11-27T00:00:00.000Z\"}]}"},{"key":"germany","conditions":"{\"and\":[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"de\"}]}"},{"key":"mobile","conditions":"{\"and\":[{\"attribute\":\"device\",\"operator\":\"equals\",\"value\":\"mobile\"}]}"},{"key":"netherlands","conditions":"[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}]"},{"key":"switzerland","conditions":"{\"and\":[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"ch\"}]}"}],"features":[{"key":"bar","defaultVariation":"control","bucketBy":"userId","variations":[{"value":"control","weight":33},{"value":"b","weight":33,"variables":[{"key":"hero","value":{"title":"Hero Title for B","subtitle":"Hero Subtitle for B","alignment":"center for B"},"overrides":[{"segments":"{\"or\":[\"germany\",\"switzerland\"]}","value":{"title":"Hero Title for B in DE or CH","subtitle":"Hero Subtitle for B in DE of CH","alignment":"center for B in DE or CH"}}]}]},{"value":"c","weight":34}],"traffic":[{"key":"1","segments":"*","percentage":50000,"allocation":[{"variation":"control","range":[0,16500]},{"variation":"b","range":[16500,33000]},{"variation":"c","range":[33000,50000]}]}],"variablesSchema":[{"key":"color","type":"string","defaultValue":"red"},{"key":"hero","type":"object","defaultValue":{"title":"Hero Title","subtitle":"Hero Subtitle","alignment":"center"}}]},{"key":"baz","defaultVariation":false,"bucketBy":"userId","variations":[{"value":true,"weight":100},{"value":false,"weight":0}],"traffic":[{"key":"1","segments":"*","percentage":80000,"allocation":[{"variation":true,"range":[0,80000]}]}]},{"key":"discount","defaultVariation":false,"bucketBy":"userId","variations":[{"value":true,"weight":100},{"value":false,"weight":0}],"traffic":[{"key":"2","segments":"[\"blackFridayWeekend\"]","percentage":100000,"allocation":[{"variation":true,"range":[0,100000]}]},{"key":"1","segments":"*","percentage":0,"allocation":[]}]},{"key":"foo","defaultVariation":false,"bucketBy":"userId","variations":[{"value":false,"weight":50},{"value":true,"weight":50,"variables":[{"key":"bar","value":"bar_here","overrides":[{"segments":"{\"or\":[\"germany\",\"switzerland\"]}","value":"bar for DE or CH"}]},{"key":"baz","value":"baz_here"}]}],"traffic":[{"key":"1","segments":"{\"and\":[\"mobile\",{\"or\":[\"germany\",\"switzerland\"]}]}","percentage":80000,"allocation":[{"variation":false,"range":[0,40000]},{"variation":true,"range":[40000,80000]}]},{"key":"2","segments":"*","percentage":50000,"allocation":[{"variation":false,"range":[0,25000]},{"variation":true,"range":[25000,50000]}]}],"variablesSchema":[{"key":"bar","type":"string","defaultValue":""},{"key":"baz","type":"string","defaultValue":""}],"force":[{"conditions":{"and":[{"attribute":"userId","operator":"equals","value":"123"},{"attribute":"device","operator":"equals","value":"mobile"}]},"variation":true,"variables":{"bar":"yoooooo"}}]},{"key":"qux","defaultVariation":"control","bucketBy":"userId","variations":[{"value":"control","weight":33.34},{"value":"b","weight":33.33,"variables":[{"key":"fooConfig","value":"{\"foo\": \"bar b\"}"}]},{"value":"c","weight":33.33}],"traffic":[{"key":"1","segments":"[\"germany\"]","percentage":50000,"allocation":[{"variation":"control","range":[50001,66671]},{"variation":"b","range":[66671,83336]},{"variation":"c","range":[83336,100000]}],"variation":"b"},{"key":"2","segments":"*","percentage":50000,"allocation":[{"variation":"control","range":[50001,66671]},{"variation":"b","range":[66671,83336]},{"variation":"c","range":[83336,100000]}]}],"variablesSchema":[{"type":"json","key":"fooConfig","defaultValue":"{\"foo\": \"bar\"}"}]},{"key":"sidebar","defaultVariation":false,"bucketBy":"userId","variations":[{"value":false,"weight":10},{"value":true,"weight":90,"variables":[{"key":"position","value":"right"},{"key":"color","value":"red","overrides":[{"segments":"[\"germany\"]","value":"yellow"},{"segments":"[\"switzerland\"]","value":"white"}]},{"key":"sections","value":["home","about","contact"],"overrides":[{"segments":"[\"germany\"]","value":["home","about","contact","imprint"]},{"segments":"[\"netherlands\"]","value":["home","about","contact","bitterballen"]}]}]}],"traffic":[{"key":"1","segments":"*","percentage":100000,"allocation":[{"variation":false,"range":[0,10000]},{"variation":true,"range":[10000,100000]}],"variables":{"title":"Sidebar Title for production"}}],"variablesSchema":[{"key":"position","type":"string","defaultValue":"left"},{"key":"color","type":"string","defaultValue":"red"},{"key":"sections","type":"array","defaultValue":[]},{"key":"title","type":"string","defaultValue":"Sidebar Title"}]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment