Currently, it is not possible to use rules to set enableABTest:true|false
at query time. This is because A/B test variants are assigned before rules are triggered.
If you want to control A/B test participation, the enableABTest
parameter must be appended directly to the outgoing query.
Excluding Specific Queries from A/B Tests
In instances where you wish to exclude certain queries from A/B tests, for example, to exclude queries originating from a mobile device, you can follow this approach:
- Apply an
analyticsTag
to queries sent from mobile eg.analyticsTag:mobile
- Creating some conditional logic to append
enableABTest:false
when the relevant tag is present
This method allows you to selectively exclude certain traffic from A/B testing, similar to the strategy outlined here.