From ff4f83a998b559493220388727cbc2f5da399f22 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Tue, 18 Oct 2016 15:44:07 -0500 Subject: [PATCH] Fix #1778, change custom dimensions from cd0 to cd2 --- addon/data/shooter-interactive-worker.js | 4 ++-- addon/lib/req.js | 5 +++-- docs/METRICS.md | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/addon/data/shooter-interactive-worker.js b/addon/data/shooter-interactive-worker.js index 4a71a6fca6..4bb043eea5 100644 --- a/addon/data/shooter-interactive-worker.js +++ b/addon/data/shooter-interactive-worker.js @@ -67,8 +67,8 @@ function eventOptionsForBox(box) { return Math.floor(Math.abs(n) / 10) * 10; } return { - cd0: round10(box.right - box.left), - cd1: round10(box.bottom - box.top) + cd1: round10(box.bottom - box.top), + cd2: round10(box.right - box.left) }; } diff --git a/addon/lib/req.js b/addon/lib/req.js index 71692f7a8e..f5f5dfad95 100644 --- a/addon/lib/req.js +++ b/addon/lib/req.js @@ -40,8 +40,9 @@ exports.request = function (url, options) { // https://github.com/peaksandpies/universal-analytics/blob/master/AcceptableParams.md const eventOptions = { eventValue: true, - cd0: true, // custom dimension 0 - cd1: true // custom dimension 1 + // Note each custom dimension must be configured in Google Analytics before use: + cd1: true, // Image height + cd2: true // Image width }; exports.sendEvent = function (action, label, options) { diff --git a/docs/METRICS.md b/docs/METRICS.md index a831ec0172..af185b7afe 100644 --- a/docs/METRICS.md +++ b/docs/METRICS.md @@ -93,8 +93,8 @@ Event label: exactly what control invoked the action, such as toolbar-pageshot-b 3. ~~Click "select region" `addon/start-region-select/mode-click`~~ 4. ~~Click "select archive" `addon/start-archive/mode-click`~~ 5. ~~Click "cancel" from first interface `addon/cancel-shot/mode-click`~~ -2. [x] Make a selection `addon/make-selection/selection-drag` with `cd0: {px width}, cd1: {px height}` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/1t2I0A2H3U2q2S0x1w1z/Image%202016-09-07%20at%201.58.58%20PM.png?v=8a788938) -3. [x] Make a selection by clicking on an element `addon/make-selection/selection-click` with `cd0: {px width}, cd1: {px height}` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/3a2C2S06463H1T2E313z/Image%202016-09-07%20at%201.59.52%20PM.png?v=86f2c12f) +2. [x] Make a selection `addon/make-selection/selection-drag` with `cd2: {px width}, cd1: {px height}` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/1t2I0A2H3U2q2S0x1w1z/Image%202016-09-07%20at%201.58.58%20PM.png?v=8a788938) +3. [x] Make a selection by clicking on an element `addon/make-selection/selection-click` with `cd2: {px width}, cd1: {px height}` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/3a2C2S06463H1T2E313z/Image%202016-09-07%20at%201.59.52%20PM.png?v=86f2c12f) 4. [x] Click but fail to find an element that can be selected `addon/no-selection/no-element-found` (error case, not sure when it happens) 3. [x] Cancel a selection by clicking on the background `addon/cancel-selection/selection-background-mousedown` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/2B3h0J3e1V1M0t0e370d/Image%202016-09-07%20at%202.00.36%20PM.png?v=d95cf082) 4. [x] Start resizing the selection `addon/start-resize-selection/handle` ![image](https://d17oy1vhnax1f7.cloudfront.net/items/0b3W0a2q1B3T2s3B3u1n/Image%202016-09-07%20at%202.01.31%20PM.png?v=a725566b)