no pointers
This commit is contained in:
parent
66902783a1
commit
7e0acc5f92
|
@ -73,7 +73,7 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) {
|
|||
s.renderTemplatePage("blogpost.html", p).ServeHTTP(w, r)
|
||||
|
||||
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")),
|
||||
Event: "Post Viewed",
|
||||
Properties: analytics.NewProperties().SetURL(r.RequestURI).SetTitle(p.Title),
|
||||
|
|
|
@ -59,7 +59,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{
|
||||
err := s.segment.Enqueue(analytics.Track{
|
||||
UserId: Hash(r.RemoteAddr, r.Header.Get("X-Forwarded-For")),
|
||||
Event: "Page Viewed",
|
||||
Properties: analytics.NewProperties().SetURL(r.RequestURI),
|
||||
|
|
Loading…
Reference in New Issue