Replies: 3 comments
-
Hi! Unfortunately not. It is something I have wanted to add to the library for a long time, but I haven't. It should not be hard according to the official docs. PRs are welcome 😉 |
Beta Was this translation helpful? Give feedback.
-
I just turned this into a discussion for now, as I am not planning to add this feature in the short term myself. |
Beta Was this translation helpful? Give feedback.
-
I did something like this based on those docs which seemed to work. const props: PlausibleEvents['signup'] = {
provider: 'email'
};
await fetch(getURL() + '/api/event', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'User-Agent': req.headers.get('User-Agent') || ''
},
body: JSON.stringify({
domain: 'my.domain',
name: 'signup',
url: '/signup',
props: props
})
}); Maybe I'll take a look at how this could work in the library, as this is was fast and messy. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the awesome package!
Is it possible to track events using this package from the server?
I want to track some events inside an API route.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions