https://github.com/euskadi31/go-amplitude
Amplitude Client for Go
https://github.com/euskadi31/go-amplitude
amplitude amplitude-analytics analytics client go go-module go-modules golang sdk
Last synced: 3 months ago
JSON representation
Amplitude Client for Go
- Host: GitHub
- URL: https://github.com/euskadi31/go-amplitude
- Owner: euskadi31
- License: mit
- Created: 2022-01-28T09:00:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-26T09:30:47.000Z (4 months ago)
- Last Synced: 2025-02-26T10:33:11.472Z (4 months ago)
- Topics: amplitude, amplitude-analytics, analytics, client, go, go-module, go-modules, golang, sdk
- Language: Go
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Amplitude Client for Go [](https://github.com/euskadi31/go-amplitude/releases/latest) [](https://godoc.org/github.com/euskadi31/go-amplitude)
[](https://goreportcard.com/report/github.com/euskadi31/go-amplitude)
| Branch | Status | Coverage |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| master | [](https://github.com/euskadi31/go-amplitude/actions/workflows/go.yml) | [](https://coveralls.io/github/euskadi31/go-amplitude?branch=master) |## Example
```go
package mainimport (
"github.com/euskadi31/go-amplitude"
)func main() {
client := amplitude.New(
"my-amplitude-key",
amplitude.WithURL(amplitude.EUResidencyEndpoint),
)
defer client.Close()evt := &litude.Event{
EventType: "user.created",
UserID: "c427ba84-a0c3-48d5-aaef-302734212064",
EventProperties: map[string]interface{}{
"from": "mobile",
},
UserProperties: map[string]interface{}{
"birthday_year": "1987",
},
}if err := client.Enqueue(evt); err != nil {
panic(err)
}
}
```