govuk_frontend_toolkit 4.7.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaa5f7117e30f5312a36798eb20156bfe780d2a9
4
- data.tar.gz: 1325ad166e0234a847bde510e26f8f0eb69fc774
3
+ metadata.gz: 1bf84ca5f409edb14c30de9f164e2a882020cfe6
4
+ data.tar.gz: e5bb03235b7a6cd7a694094e99e8f1abf61ec2ad
5
5
  SHA512:
6
- metadata.gz: d46e13e3da38fe2c8a70d0ff7bf14a0c3e8b8933a8652a1165a0deb0b3fe8d20a0279f8f93afc31d6beec86e0fc06a998aff298d8109e52b0e96f2cb2c3e95cd
7
- data.tar.gz: 1aaa3cd5fafc3450c5ac8f6425822e8faf7798168458fb0b6019ea0f034841afe9309f023ac02671ec89de7a06342509add753ec36110587d62ac237b93d0bad
6
+ metadata.gz: e529cdabcb19a17969515e8e259b61ff061987c1bfe7c30f8b68212bd563a5b44cd13f278828f656aa01fbf1a5d6f8ba5933c25c1cf2bb2abd6329c2c0d07bc7
7
+ data.tar.gz: 374dd5938b13d38ca5ca6fbab70ed02818f9754062e2ff9d4f56712f4414face85a355e0db1df625d3c14696f89b739eff8d296aa56527f956d017d6cc7e9cfd
@@ -1,3 +1,7 @@
1
+ # 4.8.0
2
+
3
+ - Pass cohort name to analytics when using multivariate test (PR #251)
4
+
1
5
  # 4.7.0
2
6
 
3
7
  - Add 'mailto' tracking to GOV.UK Analytics (PR #244)
@@ -1 +1 @@
1
- 4.7.0
1
+ 4.8.0
@@ -248,7 +248,7 @@ var test = new GOVUK.MultivariateTest({
248
248
  });
249
249
  ```
250
250
 
251
- `customDimensionIndex` is the index of the custom variable in Google Analytics. GA only gives 50 integer slots to each account, and it is important that a unique integer is assigned to each test. Current contact for assigning a custom var slot for GOV.UK is: Ashraf Chohan <ashraf.chohan@digital.cabinet-office.gov.uk>
251
+ `customDimensionIndex` is the index of the custom variable in Google Analytics. GA only gives 50 integer slots to each account, and it is important that a unique integer is assigned to each test. Current contact for assigning a custom var slot for GOV.UK is: Tim Leighton-Boyce <tim.leighton-boyce@digital.cabinet-office.gov.uk>
252
252
 
253
253
  ## Primary Links
254
254
 
@@ -77,9 +77,7 @@
77
77
  if (this.customDimensionIndex) {
78
78
  GOVUK.analytics.setDimension(
79
79
  this.customDimensionIndex,
80
- this.cookieName(),
81
- cohort,
82
- 2 // session level
80
+ this.cookieName() + "__" + cohort
83
81
  );
84
82
  }
85
83
  };
@@ -47,7 +47,7 @@ describe("MultivariateTest", function() {
47
47
  expect(fooSpy).toHaveBeenCalled();
48
48
  });
49
49
 
50
- it("should set a custom var if one is defined", function() {
50
+ it("should set a custom var with the name and cohort if one is defined", function() {
51
51
  GOVUK.cookie.and.returnValue('foo');
52
52
  var test = new GOVUK.MultivariateTest({
53
53
  name: 'stuff',
@@ -59,10 +59,19 @@ describe("MultivariateTest", function() {
59
59
  });
60
60
  expect(GOVUK.analytics.setDimension).toHaveBeenCalledWith(
61
61
  2,
62
- 'multivariatetest_cohort_stuff',
63
- 'foo',
64
- 2
62
+ 'multivariatetest_cohort_stuff__foo'
65
63
  );
64
+ });
65
+
66
+ it("should trigger an event to track that the test has been run", function() {
67
+ GOVUK.cookie.and.returnValue('foo');
68
+ var test = new GOVUK.MultivariateTest({
69
+ name: 'stuff',
70
+ cohorts: {
71
+ foo: {},
72
+ bar: {}
73
+ },
74
+ });
66
75
  expect(GOVUK.analytics.trackEvent).toHaveBeenCalledWith(
67
76
  'multivariatetest_cohort_stuff',
68
77
  'run',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_frontend_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 4.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Wright
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails