Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend search engines to cover top #5 worldwide #340

Merged
merged 1 commit into from
Mar 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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