Compare commits

...

18 Commits

Author SHA1 Message Date
a1fb445b06 1.11.3 2020-07-08 14:55:39 +01:00
8a516131ea Updates to analytics for PWAs (#772)
* Updates to analytics experiments

* adjust hover color on install button

* adjust event action names

* adjust utm_source for share_target launches

Co-authored-by: Jake Archibald <jaffathecake@gmail.com>
2020-07-08 14:53:36 +01:00
9816be83ab Add Windows to Travis config (#775)
This will help to catch somewhat frequent Windows-specific issues in the future (latest example: #774).
2020-07-08 14:28:31 +01:00
57418034c4 1.11.2 2020-07-07 16:08:26 +01:00
3892490023 Update size report branch 2020-07-07 16:08:13 +01:00
5bedff583b Update privacy link (#771)
The link doesn't work, as the default branch has been renamed
2020-07-07 16:06:33 +01:00
d94835402f 1.11.1 2020-07-02 14:29:00 +01:00
b7e45ab843 Bringing live back in sync 2020-07-02 14:28:40 +01:00
2b3cafb1f4 1.11.0 2020-06-24 16:22:06 +01:00
d52698f005 Merge remote-tracking branch 'origin/dev' into live 2020-06-24 16:21:49 +01:00
eeb3d3562a 1.10.3 2020-04-22 17:35:39 +01:00
2d73c24e09 Merge remote-tracking branch 'origin/master' into live 2020-04-22 17:34:10 +01:00
f4a16022ef 1.10.2 2020-04-16 20:07:42 +01:00
12153c72dc Merge remote-tracking branch 'origin/master' into live 2020-04-16 20:07:08 +01:00
62c53c9fed 1.10.1 2020-04-16 11:52:59 +01:00
53a38b2ba1 Merge remote-tracking branch 'origin/master' into live 2020-04-16 11:52:34 +01:00
22b7e36c01 1.10.0 2020-04-14 13:29:05 +01:00
a0e6a377cd Merge remote-tracking branch 'origin/master' into live 2020-04-14 13:28:27 +01:00
7 changed files with 27 additions and 11 deletions

View File

@ -2,3 +2,6 @@ language: node_js
cache: npm
script: npm run build
after_success: npm run sizereport
os:
- linux
- windows

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "squoosh",
"version": "1.9.1",
"version": "1.11.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "squoosh",
"version": "1.9.1",
"version": "1.11.3",
"license": "apache-2.0",
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0 --hot",

View File

@ -3,7 +3,7 @@ const escapeRE = require("escape-string-regexp");
module.exports = {
repo: "GoogleChromeLabs/squoosh",
path: "build/**/!(*.map)",
branch: "master",
branch: "dev",
findRenamed(path, newPaths) {
const nameParts = /^(.+\.)[a-f0-9]+(\..+)$/.exec(path);
if (!nameParts) return;

View File

@ -41,7 +41,7 @@ const demos = [
},
];
const installButtonSource = 'introInstallButton';
const installButtonSource = 'introInstallButton-Purple';
interface Props {
onFile: (file: File | Fileish) => void;
@ -113,7 +113,12 @@ export default class Intro extends Component<Props, State> {
this.setState({ beforeInstallEvent: event });
// Log the event.
ga('send', 'event', 'pwa-install', 'available');
const gaEventInfo = {
eventCategory: 'pwa-install',
eventAction: 'promo-shown',
nonInteraction: true,
};
ga('send', 'event', gaEventInfo);
}
@bind
@ -130,7 +135,14 @@ export default class Intro extends Component<Props, State> {
// Wait for the user to accept or dismiss the install prompt
const { outcome } = await beforeInstallEvent.userChoice;
ga('send', 'event', 'pwa-install', installButtonSource, outcome);
// Send the analytics data
const gaEventInfo = {
eventCategory: 'pwa-install',
eventAction: 'promo-clicked',
eventLabel: installButtonSource,
eventValue: outcome === 'accepted' ? 1 : 0,
};
ga('send', 'event', gaEventInfo);
// If the prompt was dismissed, we aren't going to install via the button.
if (outcome === 'dismissed') {
@ -204,7 +216,7 @@ export default class Intro extends Component<Props, State> {
<li><a href="https://github.com/GoogleChromeLabs/squoosh/">View the code</a></li>
<li><a href="https://github.com/GoogleChromeLabs/squoosh/issues">Report a bug</a></li>
<li>
<a href="https://github.com/GoogleChromeLabs/squoosh/blob/master/README.md#privacy">
<a href="https://github.com/GoogleChromeLabs/squoosh/blob/dev/README.md#privacy">
Privacy
</a>
</li>

View File

@ -175,11 +175,12 @@
&:hover,
&:focus {
background: #f5f5f5;
background: #504488;
}
background: #fff;
background: #5D509E;
border: 1px solid #e8e8e8;
color: #fff;
padding: 14px;
font-size: 1.3rem;

View File

@ -1,7 +1,7 @@
{
"name": "Squoosh",
"short_name": "Squoosh",
"start_url": "/",
"start_url": "/?utm_medium=PWA&utm_source=launcher",
"display": "standalone",
"orientation": "any",
"background_color": "#fff",
@ -20,7 +20,7 @@
}
],
"share_target": {
"action": "/?share-target",
"action": "/?utm_medium=PWA&utm_source=share-target&share-target",
"method": "POST",
"enctype": "multipart/form-data",
"params": {