### Install Amplitude Go SDK Source: https://github.com/amplitude/analytics-go/blob/main/README.md Install the analytics-go package using the go get command. ```bash go get github.com/amplitude/analytics-go ``` -------------------------------- ### Basic Event Tracking with Amplitude Go SDK Source: https://github.com/amplitude/analytics-go/blob/main/README.md Demonstrates how to initialize the Amplitude client and track a basic event. Ensure either UserID or DeviceID is provided. The client should be shut down after use to flush queued events. ```go package main import ( "github.com/amplitude/analytics-go/amplitude" ) func main() { config := amplitude.NewConfig("your-api-key") client := amplitude.NewClient(config) // Track a basic event // One of UserID and DeviceID is required client.Track(amplitude.Event{ EventType: "type-of-event", UserID: "user-id", }) // Flushed queued events and shutdown the client client.Shutdown() } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.