Snowplow event tracker for client-side and server-side JavaScript. Add analytics to your websites, web apps and servers.
Installations
npm install @snowplow/tracker-core
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
18.20.5
NPM Version
10.8.2
Statistics
555 Stars
1,544 Commits
222 Forks
49 Watching
29 Branches
79 Contributors
Updated on 28 Nov 2024
Languages
TypeScript (87.48%)
JavaScript (7.66%)
HTML (4.68%)
CSS (0.11%)
Shell (0.07%)
Total Downloads
Cumulative downloads
Total Downloads
22,448,019
Last day
-7.9%
66,438
Compared to previous day
Last week
3.5%
343,486
Compared to previous week
Last month
29.9%
1,481,648
Compared to previous month
Last year
104.2%
13,201,100
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
18
Browser and Node.js analytics for Snowplow
Snowplow is a scalable open-source platform for rich, high quality, low-latency data collection. It is designed to collect high quality, complete behavioral data for enterprise business.
To find out more, please check out the Snowplow website and our documentation.
Snowplow JavaScript Trackers Overview
The Snowplow JavaScript Trackers allow you to add analytics to your websites, web apps and Node.js applications when using a Snowplow pipeline.
With these trackers you can collect user event data (page views, e-commerce transactions etc) from the client-side and server-side tiers of your websites and web apps.
Technical documentation can be found for each tracker in our Documentation.
@snowplow/browser-tracker (npm)
Technical Docs | Setup Guide |
---|---|
Technical Docs | Setup Guide |
@snowplow/javascript-tracker (tag based)
Technical Docs | Setup Guide |
---|---|
Technical Docs | Setup Guide |
@snowplow/node-tracker (npm)
Technical Docs | Setup Guide |
---|---|
Technical Docs | Setup Guide |
Maintainers
Contributing |
---|
Contributing |
Maintainer quick start
Assuming git, Node.js 18 - 20 are installed.
Clone repository
1git clone https://github.com/snowplow/snowplow-javascript-tracker.git
Install gitleaks
To commit with safety in the repository, preventing sensitive key leakage, we use gitleaks. Gitleaks runs as a pre-commit hook making sure it can prevent accidental committing of sensitive data.
To install gitleaks, you can follow the getting started section on the repository.
For open source users before the update, you might need to re-run rush install
to update your git hooks from source.
:warning: To disable gitleaks check, you can run your commit command with the SKIP=gitleaks
variable. e.g. SKIP=gitleaks git commit -m "Unsafe commit"
.
Building
1npm install -g @microsoft/rush 2rush update 3rush build
Testing
To run unit tests:
1rush test
To run e2e browser tests (locally):
- Add
127.0.0.1 snowplow-js-tracker.local
to yourhosts
file:
1cd trackers/javascript-tracker/ 2rushx test:e2e:local
Copyright and license
Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).
Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.
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 14 are checked with a SAST tool
Reason
Found 5/21 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
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
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
Project has not signed or included provenance with any releases.
Details
- 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.0.0 not signed: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/182232842
- 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
- Warn: release artifact 4.0.0 does not have provenance: https://api.github.com/repos/snowplow/snowplow-javascript-tracker/releases/182232842
Reason
18 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-9wv6-86v2-598j
- 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-11-18
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