forked from cadey/xesite
less anonymous
This commit is contained in:
parent
7e0acc5f92
commit
0329cb5bd8
|
@ -74,7 +74,7 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
if s.segment != nil {
|
if s.segment != nil {
|
||||||
err := s.segment.Enqueue(analytics.Track{
|
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",
|
Event: "Post Viewed",
|
||||||
Properties: analytics.NewProperties().SetURL(r.RequestURI).SetTitle(p.Title),
|
Properties: analytics.NewProperties().SetURL(r.RequestURI).SetTitle(p.Title),
|
||||||
})
|
})
|
||||||
|
|
|
@ -60,7 +60,7 @@ func (s *Site) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
if s.segment != nil {
|
if s.segment != nil {
|
||||||
if !strings.HasPrefix(r.RequestURI, "/blog/") {
|
if !strings.HasPrefix(r.RequestURI, "/blog/") {
|
||||||
err := s.segment.Enqueue(analytics.Track{
|
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",
|
Event: "Page Viewed",
|
||||||
Properties: analytics.NewProperties().SetURL(r.RequestURI),
|
Properties: analytics.NewProperties().SetURL(r.RequestURI),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue