Skip to content

Commit

Permalink
Merge pull request #340 from usefathom/add-more-searchindexes
Browse files Browse the repository at this point in the history
Extend search engines to cover top #5 worldwide
  • Loading branch information
LKaemmerling authored Mar 26, 2022
2 parents ba86af2 + ea8c907 commit 6a3fef6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/aggregator/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,18 @@ func (agg *Aggregator) getReferrerStats(r *results, siteID int64, t time.Time, h
Group: "",
}

// TODO: Abstract this so we can add more groupings
if strings.Contains(hostname, "www.google.") {
stats.Group = "Google"
} else if strings.Contains(stats.Hostname, "www.bing.") {
stats.Group = "Bing"
} else if strings.Contains(stats.Hostname, "www.baidu.") {
stats.Group = "Baidu"
} else if strings.Contains(stats.Hostname, "www.yandex.") {
stats.Group = "Yandex"
} else if strings.Contains(stats.Hostname, "search.yahoo.") {
stats.Group = "Yahoo!"
} else if strings.Contains(stats.Hostname, "www.findx.") {
stats.Group = "Findx"
}
}

Expand Down

0 comments on commit 6a3fef6

Please sign in to comment.