Complete the code to define a variable 'variant' using split_clients.
split_clients "$remote_addr" $variant { [1]; }
The split_clients directive assigns users to variants based on the client IP. Here, 50% of users get variant A and 50% get variant B.
Complete the code to set a variable 'color' for A/B testing with split_clients.
split_clients "$http_user_agent" $color { [1]; }
This splits users based on their user agent string, assigning 30% to 'red' and 70% to 'blue'.
Fix the error in the split_clients block to correctly assign variants.
split_clients "$cookie_user" $group { [1]; }
The correct syntax requires semicolons to separate variant assignments with spaces after semicolons.
Fill both blanks to split traffic by IP and assign variants with weights.
split_clients "$remote_addr" $test_group { [1]; [2]; }
The code assigns 20% of users to 'control' and 80% to 'experiment' groups based on IP.
Fill all three blanks to create a split_clients block with three variants.
split_clients "$http_cookie" $variant { [1]; [2]; [3]; }
This configuration splits users into three variants: 10% variantA, 20% variantB, and 70% variantC.