-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish the tracker as an npm package #2776
Comments
This already exists, https://github.com/umami-software/node |
Thank you! The name of the package is a bit misleading though, I would assume it only works in node, which is the server environment for JavaScript. For example nodemailer is using A better alternative would be |
Upon some investigation, it look like https://github.com/umami-software/node is not identical to the tracker in this repository. I has different function signatures and does not support auto-inferring of the screen size, referer, etc. |
Because those things only exist on the client side. You would just use the tracker that comes with your installation in that case, since the functionality would be bound to whatever version you are running. It wouldn't make sense as a package. |
A client side npm package would be great to have TypeScript support in our IDE, and to be able to initilaize the tracker without adding a As an example Aptabase has a client side sdk as well: https://github.com/aptabase/aptabase-js/tree/main/packages/web |
Describe the feature or enhancement
Hi there 👋
Integrating umami with JS projects that use a bundler would be more convenient with a published library. Especially when using TypeScript, since the type declarations are lost from https://github.com/umami-software/umami/blob/master/src/tracker/index.d.ts when someone wants to use the tracker now.
Solution:
Publish the https://github.com/umami-software/umami/blob/master/src/tracker as an npm package called something like
@umami/tracker
with a small modification: have an init function that accepts a configuration object instead of usingdata-*
attributes for configuration:The text was updated successfully, but these errors were encountered: