amplitude / Amplitude-Node

Server-side Node.js SDK for Amplitude
MIT License
67 stars 20 forks source link

amplitude-js there is no way to pass the insert_id parameter #82

Open dulikmixail opened 3 years ago

dulikmixail commented 3 years ago

I use "amplitude-js": "^7.4.3". Using this version, I found that it is not possible to pass the "insert_id" parameter, but it is described in the HTTP API V2 and you recommend passing it!! How to pass this parameter?

kelvin-lu commented 3 years ago

To be clear this is an issue filed for the Browser-based Javascript SDK and not the server-side Node SDK?

We didn't have optioning on that SDK for insert ID - instead, we will generate a UUID for each logEvent so that it's always attached and has a unique identifier in accordances with the HTTP v2.

dulikmixail commented 3 years ago

Yes, this is an issue filled for the Browser-based Javascript SDK. Because i want to use "insert_id" parameter so that when the event is re-sent so that it is displayed only once in amplitude per day

kelvin-lu commented 3 years ago

@dulikmixail sorry for the late response here!

When you say "event is resent", do you mean you are considering when events fail (ex. network offline) and need to be tried again or do you mean that your implementation may call logEvent twice with logically the same event and you want to pass your own insert_id ?

lynnshaoyu commented 2 years ago

hey kelvin, so are you saying there is no insert_ID property for the javascript SDK? i'm wondering if this is the case as well for the typescript SDK.