Skip to content

Commit

Permalink
Extend search engines to cover top #5 worldwide
Browse files Browse the repository at this point in the history
Superseeds #69 as the Code in this MR is not valid

Signed-off-by: Lukas Kämmerling <[email protected]>
  • Loading branch information
LKaemmerling committed Mar 26, 2022
1 parent ba86af2 commit ea8c907
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 ea8c907

Please sign in to comment.