diff options
| author | Christine Dodrill <me@christine.website> | 2018-08-22 03:28:24 +0000 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2018-08-22 03:28:24 +0000 |
| commit | 0329cb5bd806153f1e6bbe08c1137a4163d0611e (patch) | |
| tree | 1c036cbe79b2acbdcb32bf1a00b5d055cb46a461 /cmd | |
| parent | 7e0acc5f920c2de8f9d898a1148f43b8549f9d9a (diff) | |
| download | xesite-0329cb5bd806153f1e6bbe08c1137a4163d0611e.tar.xz xesite-0329cb5bd806153f1e6bbe08c1137a4163d0611e.zip | |
less anonymous
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/site/html.go | 2 | ||||
| -rw-r--r-- | cmd/site/main.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/site/html.go b/cmd/site/html.go index 0270aa5..f42b947 100644 --- a/cmd/site/html.go +++ b/cmd/site/html.go @@ -74,7 +74,7 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) { if s.segment != nil { err := s.segment.Enqueue(analytics.Track{ - UserId: Hash(r.RemoteAddr, r.Header.Get("X-Forwarded-For")), + UserId: Hash("h", r.Header.Get("X-Forwarded-For")), Event: "Post Viewed", Properties: analytics.NewProperties().SetURL(r.RequestURI).SetTitle(p.Title), }) diff --git a/cmd/site/main.go b/cmd/site/main.go index d8f8544..4295e8a 100644 --- a/cmd/site/main.go +++ b/cmd/site/main.go @@ -60,7 +60,7 @@ func (s *Site) ServeHTTP(w http.ResponseWriter, r *http.Request) { if s.segment != nil { if !strings.HasPrefix(r.RequestURI, "/blog/") { err := s.segment.Enqueue(analytics.Track{ - UserId: Hash(r.RemoteAddr, r.Header.Get("X-Forwarded-For")), + UserId: Hash("h", r.Header.Get("X-Forwarded-For")), Event: "Page Viewed", Properties: analytics.NewProperties().SetURL(r.RequestURI), }) |
