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), })