Data-driven automation messaging for growth and retention.
Lumen-go client library allows you to seamlessly identify and track user attributes and events on your app. Plus other perks.
- Identify users
- Track user events
- Update user properties
-
Setup your Lumen account.
-
Retrieve your API key.
Follow the steps below to retrieve your api key.
- Log in to your lumen dashboard.
- Navigate to Settings
- Select the API Key tab to view and copy your key.
- Install the package
go get github.com/uselumen/lumen-goimport (
"github.com/uselumen/lumen-go"
)
const LumenApiKey = "<< your-api-key >>";
lumen := lumengo.NewLumengo(LumenApiKey) data := lumengo.IdentifyParams{
Email: "john@doe.co", // required
FirstName: "Gopher",
LastName: "Basit",
}
err := lumen.Identify("<< user-identifier >>", data)
if err != nil {
return err
}
After identifying users, you can now capture their actions like "Product Clicked" or "Product Viewed" with other custom properties.
properties := map[string]interface{}{
"productId": 100023449,
}
err := lumen.Track("<< user-identifier >>", "<< event-name >>", params)
if err != nil {
return err
}- Fork it
- Clone your fork (
git clone git@github.com:MY_USERNAME/lumen-go.git && cd lumen-go) - Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'feat: Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request