個人 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.