Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #1778, change custom dimensions from cd0 to cd2
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Oct 18, 2016
1 parent 1cd58a5 commit ff4f83a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions addon/data/shooter-interactive-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
}

Expand Down
5 changes: 3 additions & 2 deletions addon/lib/req.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions docs/METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ff4f83a

Please sign in to comment.