Comments (5)
For some reason your built files are incorrect. When I go to node_modules/@amplitude/dist/src/nodeClient.js I see:
Yet this code has been patched:
Yet the version I have installed is the latest version:
from amplitude-node.
Hey @tommedema !
We haven't published those changes - apologies. I'll go ahead and publish the newest version and close this once Node 1.3.3 is available!
from amplitude-node.
Ok, thanks @kelvin-lu -- and now that I have you, where am I supposed to set the user's browser and browser version?
If os_name and os_version (which would be really odd naming though seems to be what your documentation at https://developers.amplitude.com/docs/http-api-v2 suggests), where am I supposed to define the operating system name and version?
This is what I'm currently doing but it seems ugly and doesn't distinguish between browser name and version:
platform: `${userAgent.browser.name}@${userAgent.browser.major}`,
os_name: userAgent.os.name,
os_version: userAgent.os.version,
device_brand: userAgent.device.vendor,
device_model: userAgent.device.model,
And this is the data that I have available:
"userAgent.browser.major": "88",
"userAgent.browser.name": "Chrome",
"userAgent.browser.version": "88.0.4324.146",
"userAgent.engine.name": "Blink",
"userAgent.engine.version": "88.0.4324.146",
"userAgent.os.name": "Mac OS",
"userAgent.os.version": "10.15.7",
"userAgent.ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
But it is unclear how to map these props to what Amplitude expects in the case of the browser name and version.
from amplitude-node.
@tommedema Let me confer with our dataPL team if we have any best practices but it looks close to what you have here - linking to what our Web SDK does here; we put the browser in the OS space and the OS info in the device.
what is userAgent.device.vendor
look like? I don't think I see it in your available data
from amplitude-node.
Hmm, what you referred to me is actually different from what we're doing. It seems a bit awkward to say that the device model is MacOS, Windows, etc.? MacOS is an operating system, not a device. A device might be an iPhone, Samsung Galaxy S8, etc.
Even though it might not make sense to set the OS as the device, should we do this anyway since this seems to be what the web sdk does? FYI - seems like the web guys realize this is not correct
userAgent.device.vendor will be undefined unless you are on a mobile device, in which case it will be e.g. "Samsung", "Nokia", etc.
We use ua-parser-js to retrieve these properties from the user agent
from amplitude-node.
Related Issues (20)
- Not compatible with Webpack 5 (Next.js 11) HOT 9
- Doesn't work with Next.js in APIs (events seem sent but aren't available on Amplitude dashboard) HOT 9
- Identify event taking too long to resolve HOT 3
- Node.js example has a bug for ES5 HOT 1
- requestTimeoutMillis breaks 1.8.0 -> 1.8.1 HOT 5
- How should I generate the device ID ? HOT 6
- User properties inheritance HOT 6
- UnhandledRejection when amplitude server is unavailable
- includeUtm HOT 1
- ChainAlert: new npm maintainer has published version 1.10.0 of package @amplitude/utils
- ChainAlert: new npm maintainer has published version 1.10.0 of package @amplitude/types
- Getting host verification error while installation npm install amplitude/node HOT 1
- Where can I see the event log in amplitude? HOT 1
- Can we send batch/bulk events at once HOT 1
- 📣 Introducing NEW Amplitude SDK for Node.js [BETA]
- Not compatible with Webpack 5 (Next.js 11) (fix)
- maj tslib to next major HOT 5
- How to track revenue? HOT 3
- insert_id parameter in amplitude android sdk
- Test Issue ticket creation in AMP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplitude-node.