Sample Code:
import * as amplitude from "@amplitude/analytics-browser"
const args = {
"event": "raw_test_event",
"event_label": "Some label",
"some_boolean": false,
}amplitude.track(args.event, args)
What is being sent to amplitude:
event_properties: {
"event": "raw_test_event",
"raw": {
"event_label": "Some label",
"some_boolean": false,
}
},
"gtm.uniqueEventId": 123
}
Expected:
event_properties: {
"event": "raw_test_event",
"event_label": "Some label",
"some_boolean": false}
SDK version: 2.1.3
Workaround:
It seems to be related to the key “event”. Using a different key like “event_name” fix the problem and it works as expected.
Question:
Why is this happening? It appears to be a reserved property, I did not find any documentation explaining this behaviour.