analytics

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package analytics offers datum system analytics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventManager

type EventManager struct {
	Enabled bool
	Handler Handler
}

EventManager isn't your normal party planner

func (*EventManager) AssociateUser

func (e *EventManager) AssociateUser(userID string, organizationID string)

AssociateUser function is used to associate a user with an organization in the analytics handler

func (*EventManager) Cleanup

func (e *EventManager) Cleanup()

Cleanup is responsible for cleanup

func (*EventManager) Event

func (e *EventManager) Event(eventName string, properties ph.Properties)

Event function is used to send an event to the analytics handler

func (*EventManager) NewGroup added in v0.4.2

func (e *EventManager) NewGroup(groupID string, properties ph.Properties)

NewGroup is a wrapper for creation of a new user and associating the user with the user group type

func (*EventManager) NewOrganization

func (e *EventManager) NewOrganization(organizationID, userID string, properties ph.Properties)

NewOrganization is a wrapper for the new organization event

func (*EventManager) NewUser

func (e *EventManager) 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 (*EventManager) OrganizationEvent

func (e *EventManager) 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 (*EventManager) OrganizationProperties

func (e *EventManager) OrganizationProperties(organizationID string, properties ph.Properties)

OrganizationProperties is a wrapper to set organization properties

func (*EventManager) Properties added in v0.4.2

func (e *EventManager) Properties(id, obj string, properties ph.Properties)

Properties is a wrapper to set generic object properties

func (*EventManager) UserEvent

func (e *EventManager) UserEvent(userID, eventName string, properties ph.Properties)

func (*EventManager) UserProperties

func (e *EventManager) UserProperties(userID string, properties ph.Properties)

UserProperties is a wrapper to expand the metadata properties associated with a user

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)
	Properties(id, obj string, properties ph.Properties)
	UserEvent(userID, eventName string, properties ph.Properties)
	NewUser(userID string, properties ph.Properties)
	UserProperties(userID string, properties ph.Properties)
	NewGroup(groupID string, properties ph.Properties)
	GroupEvent(groupID, userID, eventName 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

Directories

Path Synopsis
Package machine provides a basic wrapper for getting machine ID
Package machine provides a basic wrapper for getting machine ID
Package posthog contains posthog helper functions and utilities
Package posthog contains posthog helper functions and utilities

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL