README.md in govuk_ab_testing-2.3.1 vs README.md in govuk_ab_testing-2.4.0
- old
+ new
@@ -16,16 +16,13 @@
$ bundle
### Usage
-Before starting this, you'll need to
+Before starting this, you'll need to:
-- get your cookie listed on [/help/cookies](https://www.gov.uk/help/cookies)
-- configure the CDN [like we did for the Education Navigation test](https://github.com/alphagov/govuk-cdn-config/pull/17).
-The cookie and header name in the CDN config must match the test name parameter
-that you pass to the Gem. The cookie name is case-sensitive.
+- [read the documentation](https://docs.publishing.service.gov.uk/manual/ab-testing.html) on how to set up an a/b test. The cookie and header name in [fastly-configure](https://github.com/alphagov/fastly-configure) and [CDN config](https://github.digital.cabinet-office.gov.uk/gds/cdn-configs) must match the test name parameter that you pass to the Gem. The cookie name is case-sensitive.
- configure Google Analytics (guidelines to follow)
To enable testing in the app, your Rails app needs:
1. Some piece of logic to be A/B tested
@@ -55,10 +52,10 @@
def show
ab_test = GovukAbTesting::AbTest.new("your_ab_test_name", dimension: 300)
@requested_variant = ab_test.requested_variant(request.headers)
@requested_variant.configure_response(response)
- if @requested_variant.variant_b?
+ if @requested_variant.variant?('B')
render "new_show_template_to_be_tested"
else
render "show"
end
end