Setting up tracker
Loglib tracker
this is the tracker package for loglib, it's a simple package that you can use to track events in your application.
Start by installing the package
React/NextJS
usage with nextjs
app-route
pages
src/app/layout.tsx
Other Frameworks
if you're not using next js or react you can use the vanilla version of the tracker that works on any framework just call the record function on the entry point of your application here is example for astro.
CDN
To use loglib via the CDN, simply copy the following code into your script tag and replace the host with your deployed version:
Note that if you don't want to collect development logs, you can pass the env parameter as isDev(your way to know if it's development server) ? "dev": "prod"