Skip to content

Not using posthog default fields ?  #19

@TeaBough

Description

@TeaBough

Hi ! I have this code to identify my user :

func (c *Client) Identify(user tracker.User) error {
	trait := analytics.NewTraits()
	trait = trait.SetFirstName(user.FirstName).SetLastName(user.LastName).SetEmail(user.Email).
		Set("plan", user.Plan).SetCreatedAt(user.CreatedAt)
	err := c.Enqueue(analytics.Identify{
		UserId: user.ID.String(),
		Traits: trait,
	})
	if err != nil {
		c.Logger.Error(err)
	}
	return nil
}

But when I look at posthog I get this :
image

The createdAt is not of type date and firstName & lastName are not "posthog fields"... Is it a bug with the go client or am i doing something wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions