We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to implement a simple Hello World and am getting an error saying I'm missing the events field.
events
Code:
ampConfig := amplitude.NewConfig(os.Getenv("AMPLITUDE_API_KEY")) ampConfig.FlushInterval = 1 * time.Second amp := amplitude.NewClient(ampConfig) amp.Track(amplitude.Event{ EventType: "Button Clicked 2", EventOptions: amplitude.EventOptions{UserID: "test_user"}, }) amp.Flush()
Logs (with some custom logging):
[00] amplitude-analytics2022/09/08 09:55:25 Debug: Message received from messageChannel: %!(EXTRA amplitude.message={0x1400001c240 <nil>}, *amplitude.Event=&{Button Clicked 2 {test_user 1662648925051 2f60c081-e49b-4601-b91a-a9578dbc1faa amplitude-go/0.0.2 0 0 0 0 0 0 0 {}} map[] map[] map[] map[]}) [00] amplitude-analytics2022/09/08 09:55:25 Debug: Message received from messageChannel: %!(EXTRA amplitude.message={<nil> 0x140001ceea0}, *amplitude.Event=<nil>) [00] amplitude-analytics2022/09/08 09:55:25 Debug: Sending event(s) to Amplitude: %!(EXTRA string={"api_key":"19c9...","Events":[{"event_type":"Button Clicked 2","user_id":"test_user","time":1662648925051,"insert_id":"2f60c081-e49b-4601-b91a-a9578dbc1faa","library":"amplitude-go/0.0.2","plan":{}}]}) [00] amplitude-analytics2022/09/08 09:55:25 Error: HTTP request failed with 400 status%!(EXTRA string={"missing_field":"events","code":400,"error":"Request missing required field"}
The request clearly has an Events field. I’m not sure what I’m doing wrong here.
Events
The text was updated successfully, but these errors were encountered:
Hi @moubry Could you please try version v0.0.3? The code snippet works for me.
v0.0.3
Sorry, something went wrong.
No branches or pull requests
I'm trying to implement a simple Hello World and am getting an error saying I'm missing the
events
field.Code:
Logs (with some custom logging):
The request clearly has an
Events
field. I’m not sure what I’m doing wrong here.The text was updated successfully, but these errors were encountered: