2
Provide a separate tracker package for deep integration
Source: umami-software/umami#4104 · opened by @dmke
I'm working on a Rails app (with Vue frontend, no SPA), and would like to integrate the tracker directly into our frontend application.
Using a separate script tag feels wrong (not only for the additional HTTP request, but also because it's just another hint for ad blockers to latch on)...
I would like to do something like this:
Here, the init function takes all [config options]( and some [env vars]( (injected into my frontend build process) as constructor arguments, instead of reading them from currentScript (which does not work with JS modules, IIRC).
This is conceptually similar to the @umami/node functionality (but for the browser), and very much different to the @umami/api-client (which does not provide access to the event endpoint, AFAICT).
Maybe the imaginary @umami/tracker code could also be re-used in src/tracker/?
I'd be willing to prototype this, when there's interest in this.
---
Edit: A prototype can be found in #4111
Using a separate script tag feels wrong (not only for the additional HTTP request, but also because it's just another hint for ad blockers to latch on)...
I would like to do something like this:
Here, the init function takes all [config options]( and some [env vars]( (injected into my frontend build process) as constructor arguments, instead of reading them from currentScript (which does not work with JS modules, IIRC).
This is conceptually similar to the @umami/node functionality (but for the browser), and very much different to the @umami/api-client (which does not provide access to the event endpoint, AFAICT).
Maybe the imaginary @umami/tracker code could also be re-used in src/tracker/?
I'd be willing to prototype this, when there's interest in this.
---
Edit: A prototype can be found in #4111
No pledges yet. Be the first to back this.
Comments
Similar requests
Tracker: option to *not* await the request to `/api/send`
1 vote · 0 comments
Tracker pixel being cached by image proxies (GitHub Camo)
1 vote · 0 comments
Support global config object as alternative to data-* attributes
1 vote · 0 comments
Heartbeats for more accurate visit duration tracking
10 votes · 0 comments
Exclude pages from history with regular exception
1 vote · 0 comments
No comments yet.