Installations
npm install @snowplow/browser-plugin-web-vitals
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
18.20.5
NPM Version
10.8.2
Score
70.8
Supply Chain
89.3
Quality
96.5
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
TypeScript (87.48%)
JavaScript (7.66%)
HTML (4.68%)
CSS (0.11%)
Shell (0.07%)
Developer
Download Statistics
Total Downloads
137,960
Last Day
173
Last Week
589
Last Month
8,489
Last Year
123,138
GitHub Statistics
557 Stars
1,544 Commits
222 Forks
50 Watching
30 Branches
79 Contributors
Bundle Size
8.19 kB
Minified
3.44 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.1.0
Package Id
@snowplow/browser-plugin-web-vitals@4.1.0
Unpacked Size
617.93 kB
Size
116.64 kB
File Count
12
NPM Version
10.8.2
Node Version
18.20.5
Publised On
28 Nov 2024
Total Downloads
Cumulative downloads
Total Downloads
137,960
Last day
13.1%
173
Compared to previous day
Last week
-71.1%
589
Compared to previous week
Last month
-10.7%
8,489
Compared to previous month
Last year
730.8%
123,138
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
Dev Dependencies
19
Snowplow Web Vitals Tracking
Browser Plugin to be used with @snowplow/browser-tracker
.
The plugin adds the capability to track web performance metrics categorized as Web Vitals. These metrics are tracked with an event based on the web_vitals schema.
Maintainer quick start
Part of the Snowplow JavaScript Tracker monorepo.
Build with Node.js (18 - 20) and Rush.
Setup repository
1npm install -g @microsoft/rush 2git clone https://github.com/snowplow/snowplow-javascript-tracker.git 3rush update
Package Installation
With npm:
1npm install @snowplow/browser-plugin-web-vitals
Usage
Initialize your tracker with the WebVitalsPlugin
:
1import { newTracker } from '@snowplow/browser-tracker'; 2import { WebVitalsPlugin } from '@snowplow/browser-plugin-web-vitals'; 3 4newTracker('sp1', '{{collector}}', { plugins: [ WebVitalsPlugin(/* pluginOptions */) ] }); 5 6/* 7 * Available plugin options `WebVitalsPluginOptions`: 8 * { 9 * loadWebVitalsScript: Should the plugin immediately load the Core Web Vitals measurement script from UNPKG CDN. 10 * webVitalsSource: The URL endpoint the Web Vitals script should be loaded from. Defaults to the UNPKG CDN. 11 * context: Array of entity objects or entity-generating functions (the web_vitals payload is passed as a parameter) to attach to the web_vitals event. 12 * } 13 */
Choosing a Web Vitals measurement source
The default Web Vitals measurement script is loaded from the UNPKG CDN. This choice is chosen as a default but you should consider your own setup when choosing the script source. Selecting a script source from a CDN which might already be used in your website might save you from yet another connection startup time (Queueing,DNS lookup,TCP, SSL).
Another reasonable choice could be jsDelivr.
Copyright and license
Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).
Copyright (c) 2023 Snowplow Analytics Ltd.
All rights reserved.
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: BSD 3-Clause "New" or "Revised" License: LICENSE:0
Reason
SAST tool detected
Details
- Info: SAST configuration detected: Snyk
- Warn: 0 commits out of 11 are checked with a SAST tool
Reason
Found 5/24 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Warn: no topLevel permission defined: .github/workflows/change_check.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/docs.yml:9
- Warn: no topLevel permission defined: .github/workflows/publish.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish_branch.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish_prerelease.yml:1
- Warn: no topLevel permission defined: .github/workflows/snyk.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/change_check.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/change_check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/change_check.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/change_check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/change_check.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/change_check.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/docs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/docs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/docs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_branch.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_branch.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_branch.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_branch.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_branch.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_branch.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_branch.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_branch.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_prerelease.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/publish_prerelease.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snyk.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/snyk.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snyk.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/snyk.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snyk.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/snyk.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/snyk.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/snowplow/snowplow-javascript-tracker/snyk.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/change_check.yml:44
- Warn: npmCommand not pinned by hash: .github/workflows/docs.yml:24
- Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:65
- Warn: npmCommand not pinned by hash: .github/workflows/publish_prerelease.yml:65
- Info: 0 out of 24 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 10 third-party GitHubAction dependencies pinned
- Info: 0 out of 4 npmCommand dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
Project has not signed or included provenance with any releases.
Details
- Warn: release artifact 4.1.0 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/188003833
- Warn: release artifact 4.0.4 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/186586001
- Warn: release artifact 4.0.3 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/186370012
- Warn: release artifact 4.0.2 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/184709716
- Warn: release artifact 4.0.1 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/183079772
- Warn: release artifact 4.1.0 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/188003833
- Warn: release artifact 4.0.4 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/186586001
- Warn: release artifact 4.0.3 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/186370012
- Warn: release artifact 4.0.2 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/184709716
- Warn: release artifact 4.0.1 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/183079772
Reason
20 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.9
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More