You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am using Umami to send some data from a server side Node.js application.
This applications uses @umami/node to send track data to the Umami instance.
Some example code for this:
I noticed that no matter what I configured, my Umami track events were not showing up in Umami.
So I decided to dig a bit in the code and found a potentially unwanted behaviour / default value.
In the Umami server, there are multiple paths for the runtime to go:
One of them is the bot check that will fail silently if the request is being detected as a bot by the is-bot package.
The default value of your library here is Mozilla/5.0 Node/${process.version} -> the variable interpolation doesn't matter in this case:
is-bot detects this as a bot and will therefore return true on the check:
Therefore, Umami will silently drop this track event without log message or any indications why it failed. Additionally, the 200 status code indicates that the request was successful (which it wasn't).
A possible workaround is to set the undocumented variable DISABLE_BOT_CHECK to true - but this disables the check entirely.
It would be favorable if this library has a different user agent as the default value or supports setting a custom agent.
If Umami thinks that this is intended behavior, please add a log warning to Umami server.
The commit 9331047 has not changed this problem, because the regex from is-bot will match either user agent.
The text was updated successfully, but these errors were encountered:
Hello,
I am using Umami to send some data from a server side Node.js application.
This applications uses
@umami/node
to send track data to the Umami instance.Some example code for this:
The
track()
function returns aResponse
from the fetch:node/index.ts
Lines 41 to 48 in 9331047
I noticed that no matter what I configured, my Umami track events were not showing up in Umami.
So I decided to dig a bit in the code and found a potentially unwanted behaviour / default value.
In the Umami server, there are multiple paths for the runtime to go:
https://github.com/umami-software/umami/blob/7a75639dd3d7aeff46104b71ebfb3853fc0eee09/src/pages/api/send.ts#L85-L100
One of them is the bot check that will fail silently if the request is being detected as a bot by the is-bot package.
The default value of your library here is
Mozilla/5.0 Node/${process.version}
-> the variable interpolation doesn't matter in this case:node/index.ts
Line 45 in 9331047
is-bot
detects this as a bot and will therefore return true on the check:Therefore, Umami will silently drop this track event without log message or any indications why it failed. Additionally, the 200 status code indicates that the request was successful (which it wasn't).
A possible workaround is to set the undocumented variable
DISABLE_BOT_CHECK
totrue
- but this disables the check entirely.It would be favorable if this library has a different user agent as the default value or supports setting a custom agent.
If Umami thinks that this is intended behavior, please add a log warning to Umami server.
The commit 9331047 has not changed this problem, because the regex from
is-bot
will match either user agent.The text was updated successfully, but these errors were encountered: