no pointers

This commit is contained in:
Cadey Ratio 2018-08-22 03:26:10 +00:00
parent 66902783a1
commit 7e0acc5f92
2 changed files with 2 additions and 2 deletions

View File

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

View File

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