Separate tracker into library and wrapper #2414
sandstrom
started this conversation in
Anything Else
Replies: 2 comments
-
Yes, this is a good idea. We will implement this for sure at some point in the future. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I absolutely agree. Relevant comment on a PR that would fix a bug in the NPM module that has already been fixed in the handlebar scripts here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Break up your tracker code into two parts: library and wrapper.
scriptEl.getAttribute('data-api')
and passes that into a library instance.plausible-tracker
NPM package would no longer be needed. And that maintenance and synchronization burden would go away.This is how e.g. Bugsnag, Sentry and others have structured their client-side tracking libraries (check out the source for their JS notifiers).
Beta Was this translation helpful? Give feedback.
All reactions