-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from ikennaokpala/accomodate-multiple-custom-…
…dimensions Allow use of multiple `customDimensionIndex` option
- Loading branch information
Showing
3 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,6 +264,24 @@ var test = new GOVUK.MultivariateTest({ | |
|
||
`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 <[email protected]> | ||
|
||
For certain types of tests where the custom dimensions in Google Analytics can only have one of three scopes (hit, session, or user). Measuring performance of A/B tests, and want to compare test results for session-scoped custom dimensions (eg: index 222) against hit-scoped ones (eg: index 223) may become important. | ||
|
||
Instead of supplying an integer (like the above example), `customDimensionIndex` can also accept an array of dimension indexes ([222, 223]), see below for more. | ||
|
||
Make sure to check GA debugger that these values are being sent before deploying. | ||
|
||
```js | ||
var test = new GOVUK.MultivariateTest({ | ||
name: 'car_tax_button_text', | ||
customDimensionIndex: [222, 223], | ||
cohorts: { | ||
pay_your_car_tax: {weight: 25}, | ||
give_us_money: {weight: 50} | ||
} | ||
}); | ||
``` | ||
|
||
|
||
## Primary Links | ||
|
||
`GOVUK.PrimaryList` hides elements in a list which don't have a supplied | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters