move files to hrp

This commit is contained in:
debugtalk
2022-03-23 15:10:23 +08:00
parent f8113ea364
commit 8268aa0822
125 changed files with 0 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
package ga
import (
"github.com/denisbrodbeck/machineid"
"github.com/google/uuid"
)
const (
trackingID = "UA-114587036-1" // Tracking ID for Google Analytics
)
var gaClient *GAClient
func init() {
clientID, err := machineid.ProtectedID("hrp")
if err != nil {
nodeUUID, _ := uuid.NewUUID()
clientID = nodeUUID.String()
}
gaClient = NewGAClient(trackingID, clientID)
}
func SendEvent(e IEvent) error {
return gaClient.SendEvent(e)
}