Go product analytics installation
Terminal
go get github.com/posthog/posthog-go
Go
package mainimport ("os""github.com/posthog/posthog-go")func main() {client, _ := posthog.NewWithConfig(os.Getenv("POSTHOG_API_KEY"),posthog.Config{PersonalApiKey: "your personal API key", // Optional, but much more performant. If this token is not supplied, then fetching feature flag values will be slower.Endpoint: "https://us.i.posthog.com",},)defer client.Close()// run commands}