mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-13 17:27:09 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1fb445b06 | ||
|
|
8a516131ea | ||
|
|
9816be83ab |
@@ -2,3 +2,6 @@ language: node_js
|
|||||||
cache: npm
|
cache: npm
|
||||||
script: npm run build
|
script: npm run build
|
||||||
after_success: npm run sizereport
|
after_success: npm run sizereport
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "squoosh",
|
"name": "squoosh",
|
||||||
"version": "1.11.2",
|
"version": "1.11.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "squoosh",
|
"name": "squoosh",
|
||||||
"version": "1.11.2",
|
"version": "1.11.3",
|
||||||
"license": "apache-2.0",
|
"license": "apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
"start": "webpack-dev-server --host 0.0.0.0 --hot",
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const demos = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const installButtonSource = 'introInstallButton';
|
const installButtonSource = 'introInstallButton-Purple';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onFile: (file: File | Fileish) => void;
|
onFile: (file: File | Fileish) => void;
|
||||||
@@ -113,7 +113,12 @@ export default class Intro extends Component<Props, State> {
|
|||||||
this.setState({ beforeInstallEvent: event });
|
this.setState({ beforeInstallEvent: event });
|
||||||
|
|
||||||
// Log the 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
|
@bind
|
||||||
@@ -130,7 +135,14 @@ export default class Intro extends Component<Props, State> {
|
|||||||
|
|
||||||
// Wait for the user to accept or dismiss the install prompt
|
// Wait for the user to accept or dismiss the install prompt
|
||||||
const { outcome } = await beforeInstallEvent.userChoice;
|
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 the prompt was dismissed, we aren't going to install via the button.
|
||||||
if (outcome === 'dismissed') {
|
if (outcome === 'dismissed') {
|
||||||
|
|||||||
@@ -175,11 +175,12 @@
|
|||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
background: #f5f5f5;
|
background: #504488;
|
||||||
}
|
}
|
||||||
|
|
||||||
background: #fff;
|
background: #5D509E;
|
||||||
border: 1px solid #e8e8e8;
|
border: 1px solid #e8e8e8;
|
||||||
|
color: #fff;
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Squoosh",
|
"name": "Squoosh",
|
||||||
"short_name": "Squoosh",
|
"short_name": "Squoosh",
|
||||||
"start_url": "/",
|
"start_url": "/?utm_medium=PWA&utm_source=launcher",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"orientation": "any",
|
"orientation": "any",
|
||||||
"background_color": "#fff",
|
"background_color": "#fff",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"share_target": {
|
"share_target": {
|
||||||
"action": "/?share-target",
|
"action": "/?utm_medium=PWA&utm_source=share-target&share-target",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"enctype": "multipart/form-data",
|
"enctype": "multipart/form-data",
|
||||||
"params": {
|
"params": {
|
||||||
|
|||||||
Reference in New Issue
Block a user