fix: use GA_TRACKING_ID

This commit is contained in:
debugtalk
2022-01-08 23:14:43 +08:00
parent 48c33ed9d3
commit b80730d8a4
3 changed files with 4 additions and 7 deletions

View File

@@ -1,16 +1,17 @@
package ga
import (
"os"
"github.com/denisbrodbeck/machineid"
"github.com/google/uuid"
)
const (
trackingID = "UA-114587036-1" // Tracking ID for Google Analytics
)
var gaClient *GAClient
func init() {
trackingID := os.Getenv("GA_TRACKING_ID") // Tracking ID for Google Analytics
clientID, err := machineid.ProtectedID("hrp")
if err != nil {
nodeUUID, _ := uuid.NewUUID()