Expand google subdomains, as well

This commit is contained in:
Kuba Orlik 2021-12-12 10:58:47 +01:00
parent dbc5192a3c
commit 1ec726f52e
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ export function getshorthost(host: string) {
.replace(/\/.*$/, "")
.split(".");
let lookback = parts.at(-2).length > 3 ? -2 : -3;
if (parts.at(-2) == "doubleclick") {
if (parts.at(-2) == "doubleclick" || parts.at(-2) == "google") {
lookback = -4; // to distinguish between google ads and stats
} else if (parts.at(-2) == "google") {
lookback = -3; // to distinguish various google services