Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in analytics.go #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions analytics/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var Version string

type TrackImplementationFunc func(event string, properties map[string]any) error

var trackImplmentationFunc TrackImplementationFunc = trackSyncOverHttp
var trackImplementationFunc TrackImplementationFunc = trackSyncOverHttp

func trackSyncOverHttp(event string, properties map[string]any) error {
var buf bytes.Buffer
Expand Down Expand Up @@ -92,7 +92,7 @@ func Track(event string, properties ...map[string]any) {
props["bridge_version"] = Version
// Identify to mixpanel who we are
props["mp_lib"] = bridgeType
err := trackImplmentationFunc(event, props)
err := trackImplementationFunc(event, props)
if err != nil {
glog.Err(err).Str("event", event).Msg("Error tracking event")
} else {
Expand All @@ -113,7 +113,7 @@ func Init(cfg config.AnalyticsConfig, log zerolog.Logger, briType BridgeType, tr
}).String()

if trackFunc != nil {
trackImplmentationFunc = trackFunc
trackImplementationFunc = trackFunc
}

if IsEnabled() {
Expand Down