Documentation ¶
Overview ¶
Package analytics offers datum system analytics
Index ¶
- func AssociateUser(userID string, organizationID string)
- func Cleanup()
- func Event(eventName string, properties ph.Properties)
- func NewOrganization(organizationID, userID string, properties ph.Properties)
- func NewUser(userID string, properties ph.Properties)
- func OrganizationEvent(organizationID, userID, eventName string, properties ph.Properties)
- func OrganizationProperties(organizationID string, properties ph.Properties)
- func UserEvent(userID, eventName string, properties ph.Properties)
- func UserProperties(userID string, properties ph.Properties)
- type EventManager
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssociateUser ¶
AssociateUser function is used to associate a user with an organization in the analytics handler
func Event ¶
func Event(eventName string, properties ph.Properties)
Event function is used to send an event to the analytics handler
func NewOrganization ¶
func NewOrganization(organizationID, userID string, properties ph.Properties)
NewOrganization is a wrapper for the new organization event
func NewUser ¶
func NewUser(userID string, properties ph.Properties)
NewUser is a wrapper for creation of a new user and associating the user with the user group type
func OrganizationEvent ¶
func OrganizationEvent(organizationID, userID, eventName string, properties ph.Properties)
OrganizationEvent is a generic wrapper for an event you can name which occurs within an organization (e.g. membership)
func OrganizationProperties ¶
func OrganizationProperties(organizationID string, properties ph.Properties)
OrganizationProperties is a wrapper to set organization properties
func UserEvent ¶
func UserEvent(userID, eventName string, properties ph.Properties)
func UserProperties ¶
func UserProperties(userID string, properties ph.Properties)
UserProperties is a wrapper to expand the metadata properties associated with a user
Types ¶
type EventManager ¶
type EventManager struct {
Handler Handler
}
EventManager isn't your normal party planner
type Handler ¶
type Handler interface { Event(eventName string, properties ph.Properties) AssociateUser(userID string, organizationID string) OrganizationEvent(organizationID, userID, eventName string, properties ph.Properties) NewOrganization(organizationID, userID string, properties ph.Properties) OrganizationProperties(organizationID string, properties ph.Properties) UserEvent(userID, eventName string, properties ph.Properties) NewUser(userID string, properties ph.Properties) UserProperties(userID string, properties ph.Properties) Cleanup() }
Handler is an interface which can be used to call various event / event association parameters provided by the posthog API