packages | ||
test | ||
.gitignore | ||
bun.lock | ||
CHANGES.md | ||
package.json | ||
README.md | ||
turbo.json |
Warning
Zalvena is currently under a rewrite
Zalvena
Fork of the JavaScript SDK for Aptabase, modified for SudoVanilla projects.
Install
Install the SDK using bun or your preferred JavaScript package manager:
bun add @sudovanilla/zalvena
Usage
First you need to get your App Key
from Zalvena, you can find it in the Instructions
menu on the left side menu.
Initialize the SDK using your App Key
:
import { init } from '@sudovanilla/zalvena';
init('<APPKEY>');
// If you selfhost, use this instead
init('<APPKEY', { host: 'https://zv.example.org' });
The init function also supports an optional second parameter, which is an object with the appVersion
property.
It's up to you to decide how to get the version of your app, but it's generally recommended to use your bundler (like Webpack, Vite, Rollup, etc.) to inject the values at build time. Alternatively you can also pass it in manually.
Afterwards you can start tracking events with trackEvent
:
import { trackEvent } from '@sudovanilla/zalvena';
trackEvent('connect_click');
trackEvent('play_music', {
name: 'Here comes the sun',
});
A few important notes:
- The SDK will automatically enhance the event with some useful information, like the OS and other properties.
- You're in control of what gets sent to Zalvena. This SDK does not automatically track any events, you need to call
trackEvent
manually.- Because of this, it's generally recommended to at least track an event at startup
- You do not need to await the
trackEvent
function, it'll run in the background. - Only strings and numeric values are allowed on custom properties
Development
To get started, make sure you've already have git and Bun installed.
Then, with Bun, install packages:
bun install
Run test website:
bun run test
If you make any changes in /packages/
, run the build
command to update the test:
bun run build
License
License for Zalvena
MIT License NON-AI
Copyright 2025 SudoVanilla
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
In addition, the following restrictions apply:
1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms, including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives, modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
2. The Software may not be included in any dataset used for training or improving machine learning algorithms, including but not limited to artificial intelligence, natural language processing, or data mining.
3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable for any damages resulting from such use.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License for Aptabase JavaScript SDK
MIT License
Copyright (c) 2023 Sumbit Labs Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.