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

Commit

Permalink
Showing 6 changed files with 51 additions and 24 deletions.
1 change: 1 addition & 0 deletions addon/lib/shooter.js
Original file line number Diff line number Diff line change
@@ -137,6 +137,7 @@ const ShotContext = Class({
},

takeShot: function () {
this.shot.createdDate = Date.now();
let finishTimer = startTimer({
variable: "take-shot"
});
16 changes: 15 additions & 1 deletion docs/METRICS.md
Original file line number Diff line number Diff line change
@@ -88,12 +88,26 @@ Event label: exactly what control invoked the action, such as toolbar-pageshot-b

##### Highlight shot button

As described in [#2081](https://github.com/mozilla-services/pageshot/issues/2081) we are putting a badge on the button of some users.
As described in [#2081](https://github.com/mozilla-services/pageshot/issues/2081) we are putting a badge on the button of some users. The test is named `highlightButtonOnInstall`.

The dimension `cd3` will be `control` (no badge) or `badge` (10% of population).

If the badge is shown we send the event `addon/ab-highlight-button-shown` – this is marked as a non-interactive event.

##### Adjust My Shots button display

As described in [#2082](https://github.com/mozilla-services/pageshot/issues/2082) we are changing how the My Shots button is displayed. The test is named `styleMyShotsButton`.

The dimension `cd4` will be `control` (normal styling) or something else Yet To Be Determined.

##### Auto-open share panel

As described in [#2079](https://github.com/mozilla-services/pageshot/issues/2079) we auto-open the share panel for a set of users. The test is named `autoOpenSharePanel`.

The dimension `cd5` *for the creator* will be `control` (no auto-opening) or `autoopen` (share panel will be auto-opened). The dimension `cd6` will be `control` (no auto-opening *happened*) or `autoopen` (auto-open happened in the past at shot creation).

The primary change was in `server/src/pages/shot/share-buttons.js`

#### Add-on metrics

1. [x] Start the browser `addon/open-browser/launch`
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
},
"dependencies": {
"atob": "2.0.3",
"aws-sdk": "2.7.12",
"aws-sdk": "2.7.25",
"btoa": "1.1.2",
"convict": "1.5.0",
"convict": "2.0.0",
"cookies": "0.6.2",
"core-js": "2.4.1",
"domino": "1.0.26",
"domino": "1.0.27",
"envc": "2.4.1",
"escape-html": "1.0.3",
"express": "4.14.0",
@@ -24,12 +24,12 @@
"node-statsd": "0.1.1",
"nodemon": "1.11.0",
"nodify-uuid": "0.0.1",
"pg": "6.1.0",
"pg": "6.1.2",
"pg-patcher": "0.3.0",
"raven": "0.12",
"raven-js": "3.9.0",
"react": "15.4.1",
"react-dom": "15.4.1",
"raven": "1.1.1",
"raven-js": "3.9.1",
"react": "15.4.2",
"react-dom": "15.4.2",
"rimraf": "2.5.4",
"universal-analytics": "0.4.8",
"uuid": "3.0.1",
@@ -38,20 +38,20 @@
"wreck": "10.0.0"
},
"devDependencies": {
"addons-linter": "0.15.12",
"addons-linter": "0.15.15",
"babel-cli": "6.18.0",
"babel-polyfill": "6.16.0",
"babel-polyfill": "6.20.0",
"babel-preset-es2015": "6.18.0",
"babel-preset-react": "6.16.0",
"body-parser": "1.15.2",
"browserify": "13.1.1",
"eslint": "3.11.1",
"eslint-plugin-react": "6.8.0",
"body-parser": "1.16.0",
"browserify": "13.3.0",
"eslint": "3.13.1",
"eslint-plugin-react": "6.9.0",
"fx-runner": "1.0.6",
"geckodriver": "1.2.0",
"geckodriver": "1.3.0",
"mocha": "3.2.0",
"node-sass": "3.13.0",
"npm-run-all": "3.1.2",
"node-sass": "4.3.0",
"npm-run-all": "4.0.1",
"nsp": "2.6.2",
"sass-lint": "1.10.2",
"selenium-webdriver": "3.0.1",
14 changes: 12 additions & 2 deletions server/src/ab-tests.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ let allTests = {
description: "Highlight the Page Shot button when Page Shot is installed",
gaField: "cd3",
version: 1,
exclude: ["styleMyShotsButton"],
exclude: ["styleMyShotsButton", "autoOpenSharePanel"],
options: [
{name: "badge", probability: 0.1}
]
@@ -13,10 +13,20 @@ let allTests = {
description: "Style the My Shots button in some different way",
gaField: "cd4",
version: 1,
exclude: ["highlightButtonOnInstall"],
exclude: ["highlightButtonOnInstall", "autoOpenSharePanel"],
options: [
{name: "bright", probability: 0.0}
]
},
autoOpenSharePanel: {
description: "Auto-open the share panel to see how it affects sharing",
gaField: "cd5",
shotField: "cd6",
version: 1,
exclude: ["styleMyShotsButton", "highlightButtonOnInstall"],
options: [
{name: "autoopen", probability: 0.1}
]
}
};

8 changes: 5 additions & 3 deletions server/src/pages/shot/share-buttons.js
Original file line number Diff line number Diff line change
@@ -4,9 +4,11 @@ const sendEvent = require("../../browser-send-event.js");
exports.ShareButton = class ShareButton extends React.Component {
constructor(props) {
super(props);
this.state = {
display: false
};
let display = false;
if (props.abTests.autoOpenSharePanel && props.abTests.autoOpenSharePanel.value === "autoopen") {
display = props.isOwner && Date.now() - props.shot.createdDate < 30000;
}
this.state = {display};
}

render() {
2 changes: 1 addition & 1 deletion server/src/pages/shot/view.js
Original file line number Diff line number Diff line change
@@ -379,7 +379,7 @@ class Body extends React.Component {
title="Download the shot image" download={ clipFilename }>
<img src={ this.props.staticLink("/static/img/download.svg") } />
</a>
<ShareButton clipUrl={clipUrl} shot={shot} isOwner={this.props.isOwner} staticLink={this.props.staticLink} renderExtensionNotification={renderExtensionNotification} sendRichCopy={this.sendRichCopy.bind(this)} isExtInstalled={this.props.isExtInstalled} />
<ShareButton abTests={this.props.abTests} clipUrl={clipUrl} shot={shot} isOwner={this.props.isOwner} staticLink={this.props.staticLink} renderExtensionNotification={renderExtensionNotification} sendRichCopy={this.sendRichCopy.bind(this)} isExtInstalled={this.props.isExtInstalled} />
</div>
</div>
{ clips }

0 comments on commit 2b01997

Please sign in to comment.