个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Privacy-friendly analytics script: page views, sources, time on page and goals, without cookies or personal data. Under 1 KB.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗The privacy-friendly analytics script behind LaunchPal: page views, where visitors came from, time on page, scroll depth and the events you name. Under 1 KB gzipped, no dependencies.
www and its subdomains (each event records its host); the server drops
every other address, including local development and builder previews, plus known bots, and the
script sends nothing from automated browsersEvents go to LaunchPal's API, hosted in the EU. They are stored only for apps added in LaunchPal, and only from pages on that app's domain.
npm install @launchpal/tracker
import { init, track } from '@launchpal/tracker';
init({ key: '3f9c2a71b8d04e65' });
track('signed_up');
Call init once, when your app starts in the browser. After that, call track from anywhere.
key is required: your app's key, shown in LaunchPal when you connect your app. The key only says
which app the visits belong to: LaunchPal counts them only from pages on that app's domain, so local
development and builder previews stay out of your numbers. Nothing is sent on the server or before
init.
<script
defer
data-key="3f9c2a71b8d04e65"
src="https://cdn.jsdelivr.net/npm/@launchpal/tracker@0/dist/pal.js"
></script>
data-key is required, as key is above. Record an event anywhere with pal('signed_up').
If your page may call pal() before the script has loaded, add this line above the tag, so those
calls are kept and sent once it loads:
<script>window.pal = window.pal || function () { (window.pal.q = window.pal.q || []).push(arguments) }</script>
| event | when | details |
|---|---|---|
| page view | on load, and when the path changes in a single-page app | page address, referrer |
| time on page | when the tab is hidden, the page changes or it's closed | visible seconds, furthest scroll % |
| custom event | when you call track or pal | its name, up to 64 characters |
Events are sent with fetch and keepalive, so they arrive even when the page is closing. Custom events
carry only their name, so no personal data can travel with them. You'll choose which events count as
your goals in LaunchPal.
Current versions of Chrome, Edge, Firefox and Safari. The code is built for ES2022. Single-page app navigation uses the Navigation API where the browser has it, and falls back to History API changes.
npm install
npm test # builds, then runs the tests, including the 1 KB size limit
npm run lint
npm run check:package # publint and arethetypeswrong
See CONTRIBUTING.md, CHANGELOG.md, SECURITY.md and CODE_OF_CONDUCT.md.
MIT, see LICENSE.