Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
fix: use GA_TRACKING_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
debugtalk committed Jan 8, 2022
1 parent 48c33ed commit b80730d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
uses: actions/checkout@v2
- name: Release hrp cli binaries
uses: wangyoucao577/[email protected]
env:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Run coverage
env:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
run: go test -coverprofile="cover.out" -covermode=atomic -race ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
7 changes: 4 additions & 3 deletions internal/ga/init.go
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit b80730d

Please sign in to comment.