analytics

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package analytics offers datum system analytics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssociateUser

func AssociateUser(userID string, organizationID string)

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

func Cleanup

func Cleanup()

Cleanup is responsible for cleanup

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

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