oopsie
This commit is contained in:
BIN
dist/fitra-darwin-amd64
vendored
BIN
dist/fitra-darwin-amd64
vendored
Binary file not shown.
BIN
dist/fitra-darwin-arm64
vendored
BIN
dist/fitra-darwin-arm64
vendored
Binary file not shown.
BIN
dist/fitra-linux-amd64
vendored
BIN
dist/fitra-linux-amd64
vendored
Binary file not shown.
BIN
dist/fitra-linux-arm64
vendored
BIN
dist/fitra-linux-arm64
vendored
Binary file not shown.
@@ -24,12 +24,17 @@ func SendAnalyticsEvent(eventType, pathname, pageTitle, userAgent, ipAddress str
|
||||
return nil // Skip if no API key configured
|
||||
}
|
||||
|
||||
hostname := os.Getenv("BASE_URL")
|
||||
if hostname == "" {
|
||||
hostname = "localhost:8080"
|
||||
}
|
||||
|
||||
event := AnalyticsEvent{
|
||||
APIKey: apiKey,
|
||||
SiteID: "fitra-backend",
|
||||
Type: eventType,
|
||||
Pathname: pathname,
|
||||
Hostname: "a.adhd.sh",
|
||||
Hostname: hostname,
|
||||
PageTitle: pageTitle,
|
||||
UserAgent: userAgent,
|
||||
IPAddress: ipAddress,
|
||||
@@ -40,7 +45,7 @@ func SendAnalyticsEvent(eventType, pathname, pageTitle, userAgent, ipAddress str
|
||||
return err
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("POST", "https://app.rybbit.io/api/track", bytes.NewBuffer(jsonData))
|
||||
req, err := http.NewRequest("POST", "https://a.adhd.sh/api/track", bytes.NewBuffer(jsonData))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user