I just wanted to know why Openpixel sends the below information in events:
- Browser name
- Mobile device
Timestamp in microseconds
- Timezone offset (minutes away from UTC)
The first two can be extracted from User-Agent by using some 3rd party tools like 51degrees.
This is the best and most accurate way (I think) to detect the browser and the device. Let the backend handle this data extraction. This will give people the flexibility to parse the User-Agent by using their own parser algorithm or by using a tool. This will also impact Openpixel performance, event URL length, and the distributable file size in a positive manner.
The third one can also be calculated on the server-side when the event request has arrived.
For the last one, my suggestion is to detect the timezone from the visitor's IP address. There are several tools for that such as ipstack. No need to send it to the request URL?
Here are some good catches for JavaScript getTimezoneOffset method and its accuracy:
https://stackoverflow.com/questions/13/determine-a-users-timezone#comment38955981_1809974
https://stackoverflow.com/questions/13/determine-a-users-timezone#comment34982097_1809974
As I said in the beginning I am curious and just wanted to know the reasons behind it, all my opinions are open to discussion.
I just wanted to know why Openpixel sends the below information in events:
Timestamp in microsecondsThe first two can be extracted from User-Agent by using some 3rd party tools like 51degrees.
This is the best and most accurate way (I think) to detect the browser and the device. Let the backend handle this data extraction. This will give people the flexibility to parse the User-Agent by using their own parser algorithm or by using a tool. This will also impact Openpixel performance, event URL length, and the distributable file size in a positive manner.
The third one can also be calculated on the server-side when the event request has arrived.
For the last one, my suggestion is to detect the timezone from the visitor's IP address. There are several tools for that such as ipstack. No need to send it to the request URL?
Here are some good catches for JavaScript
getTimezoneOffsetmethod and its accuracy:https://stackoverflow.com/questions/13/determine-a-users-timezone#comment38955981_1809974
https://stackoverflow.com/questions/13/determine-a-users-timezone#comment34982097_1809974
As I said in the beginning I am curious and just wanted to know the reasons behind it, all my opinions are open to discussion.