Skip to content

Fix PWA custom metric #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Fix PWA custom metric #163

merged 1 commit into from
Apr 22, 2025

Conversation

tunetheweb
Copy link
Member

Discovered the pwa custom metric isn't working when initiator is blank


Test websites:

Copy link

https://almanac.httparchive.org/en/2022/

WPT result details

Changed custom metrics values:

{
  "_pwa": {
    "serviceWorkers": [],
    "manifests": [],
    "serviceWorkerInitiated": [],
    "workboxInfo": [],
    "importScriptsInfo": [],
    "swEventListenersInfo": [],
    "swPropertiesInfo": [],
    "swMethodsInfo": [],
    "swObjectsInfo": [],
    "swRegistrationPropertiesInfo": [],
    "windowEventListenersInfo": [],
    "windowPropertiesInfo": [],
    "serviceWorkerRegistrationInfo": [],
    "serviceWorkerHeuristic": false
  }
}
https://example.com

WPT result details

Changed custom metrics values:

{
  "_pwa": {
    "serviceWorkers": [],
    "manifests": [],
    "serviceWorkerInitiated": [],
    "workboxInfo": [],
    "importScriptsInfo": [],
    "swEventListenersInfo": [],
    "swPropertiesInfo": [],
    "swMethodsInfo": [],
    "swObjectsInfo": [],
    "swRegistrationPropertiesInfo": [],
    "windowEventListenersInfo": [],
    "windowPropertiesInfo": [],
    "serviceWorkerRegistrationInfo": [],
    "serviceWorkerHeuristic": false
  }
}
https://web.dev

WPT result details

Changed custom metrics values:

{
  "_pwa": {
    "serviceWorkers": [],
    "manifests": {
      "https://web.dev/_pwa/web/manifest.json": {
        "name": "web.dev",
        "short_name": "web.dev",
        "start_url": "/",
        "display": "standalone",
        "orientation": "portrait",
        "background_color": "#fff",
        "theme_color": "#3740ff",
        "icons": [
          {
            "src": "icons/icon-72x72.png",
            "sizes": "72x72",
            "type": "image/png"
          },
          {
            "src": "icons/icon-96x96.png",
            "sizes": "96x96",
            "type": "image/png"
          },
          {
            "src": "icons/icon-128x128.png",
            "sizes": "128x128",
            "type": "image/png"
          },
          {
            "src": "icons/icon-144x144.png",
            "sizes": "144x144",
            "type": "image/png"
          },
          {
            "src": "icons/icon-152x152.png",
            "sizes": "152x152",
            "type": "image/png"
          },
          {
            "src": "icons/icon-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
          },
          {
            "src": "icons/icon-384x384.png",
            "sizes": "384x384",
            "type": "image/png"
          },
          {
            "src": "icons/icon-512x512.png",
            "sizes": "512x512",
            "type": "image/png"
          }
        ],
        "splash_pages": null
      }
    },
    "serviceWorkerInitiated": [],
    "workboxInfo": [],
    "importScriptsInfo": {
      "https://www.google.com/recaptcha/api2/webworker.js?hl=en&v=ItfkQiGBlJDHuTkOhlT3zHpB": [
        "'https://www.gstatic.com/recaptcha/releases/ItfkQiGBlJDHuTkOhlT3zHpB/recaptcha__en.js'"
      ]
    },
    "swEventListenersInfo": {
      "https://web.dev/sw.js": [
        "install",
        "activate",
        "fetch"
      ],
      "https://web-dot-devsite-v2-prod-3p.appspot.com/sw.js": [
        "install",
        "activate",
        "fetch"
      ]
    },
    "swPropertiesInfo": [],
    "swMethodsInfo": {
      "https://web.dev/sw.js": [
        "skipWaiting()"
      ]
    },
    "swObjectsInfo": {
      "https://www.gstatic.com/devrel-devsite/prod/vecc914159aeb62e475fedd3fd9a8d7496387748032a2781a73bd399d6afce3ab/js/devsite_app_module.js": [
        "caches.open",
        "caches.open",
        "caches.open"
      ],
      "https://web.dev/sw.js": [
        "caches.open",
        "clients.matchAll",
        "caches.open",
        "clients.claim",
        "clients.matchAll",
        "clients.matchAll",
        "caches.keys",
        "caches.delete"
      ],
      "https://web-dot-devsite-v2-prod-3p.appspot.com/sw.js": [
        "caches.open",
        "clients.matchAll",
        "caches.open",
        "clients.claim",
        "clients.matchAll",
        "clients.matchAll",
        "caches.keys",
        "caches.delete"
      ]
    },
    "swRegistrationPropertiesInfo": [],
    "windowEventListenersInfo": [],
    "windowPropertiesInfo": [],
    "serviceWorkerRegistrationInfo": [],
    "serviceWorkerHeuristic": true
  }
}

@tunetheweb tunetheweb merged commit 646ea52 into main Apr 22, 2025
4 of 5 checks passed
@tunetheweb tunetheweb deleted the tunetheweb-patch-1 branch April 22, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant