Documentation
¶
Overview ¶
Package omnidxi provides a batteries-included Digital Experience Intelligence (DXI) client with support for multiple analytics providers.
This package re-exports core types from omnidxi-core and provides convenience functions for working with multiple providers simultaneously.
For individual provider usage, import the provider packages directly:
import "github.com/plexusone/omni-amplitude/omnidxi" import "github.com/plexusone/omni-mixpanel/omnidxi"
Index ¶
- Constants
- Variables
- type Alias
- type Config
- type Event
- type EventContext
- type EventType
- type Group
- type MultiTracker
- func (m *MultiTracker) Add(t core.Tracker)
- func (m *MultiTracker) Alias(ctx context.Context, alias core.Alias) error
- func (m *MultiTracker) Close() error
- func (m *MultiTracker) Flush(ctx context.Context) error
- func (m *MultiTracker) Group(ctx context.Context, group core.Group) error
- func (m *MultiTracker) Identify(ctx context.Context, user core.User) error
- func (m *MultiTracker) Track(ctx context.Context, event core.Event) error
- type NoopTracker
- func (n *NoopTracker) Alias(ctx context.Context, alias core.Alias) error
- func (n *NoopTracker) Close() error
- func (n *NoopTracker) Flush(ctx context.Context) error
- func (n *NoopTracker) Group(ctx context.Context, group core.Group) error
- func (n *NoopTracker) Identify(ctx context.Context, user core.User) error
- func (n *NoopTracker) Track(ctx context.Context, event core.Event) error
- type Option
- type Tracker
- type TrackerInfo
- type User
- type UserTraits
Constants ¶
const ( EventTypePageView = core.EventTypePageView EventTypePageLeave = core.EventTypePageLeave EventTypeUIClick = core.EventTypeUIClick EventTypeUIInput = core.EventTypeUIInput EventTypeUIScroll = core.EventTypeUIScroll EventTypeUISubmit = core.EventTypeUISubmit EventTypeStateChange = core.EventTypeStateChange EventTypeAPIRequest = core.EventTypeAPIRequest EventTypeAPIResponse = core.EventTypeAPIResponse EventTypeJourneyStep = core.EventTypeJourneyStep EventTypeError = core.EventTypeError EventTypePerformance = core.EventTypePerformance EventTypeCustom = core.EventTypeCustom )
Re-export event types.
Variables ¶
var ( NewEvent = core.NewEvent NewUser = core.NewUser NewGroup = core.NewGroup NewAlias = core.NewAlias NewConfig = core.NewConfig WithAPIKey = core.WithAPIKey WithLogger = core.WithLogger WithDebug = core.WithDebug )
Re-export constructors.
var ( ErrDisabled = core.ErrDisabled ErrNoAPIKey = core.ErrNoAPIKey ErrInvalidUserID = core.ErrInvalidUserID ErrInvalidEventName = core.ErrInvalidEventName ErrFlushFailed = core.ErrFlushFailed ErrClosed = core.ErrClosed )
Re-export errors.
var ( // NewAmplitudeTracker creates an Amplitude tracker. NewAmplitudeTracker = amplitude.New // NewMixpanelTracker creates a Mixpanel tracker. NewMixpanelTracker = mixpanel.New )
Provider constructors for convenience.
Functions ¶
This section is empty.
Types ¶
type MultiTracker ¶
type MultiTracker struct {
// contains filtered or unexported fields
}
MultiTracker sends events to multiple providers simultaneously.
func NewMultiTracker ¶
func NewMultiTracker(trackers ...core.Tracker) *MultiTracker
NewMultiTracker creates a new MultiTracker with the given trackers.
func (*MultiTracker) Add ¶
func (m *MultiTracker) Add(t core.Tracker)
Add adds a tracker to the multi-tracker.
func (*MultiTracker) Flush ¶
func (m *MultiTracker) Flush(ctx context.Context) error
Flush flushes all trackers.
type NoopTracker ¶
type NoopTracker struct{}
NoopTracker is a tracker that does nothing. Useful for testing or when tracking should be disabled.
func NewNoopTracker ¶
func NewNoopTracker() *NoopTracker
NewNoopTracker creates a new no-op tracker.
func (*NoopTracker) Close ¶
func (n *NoopTracker) Close() error