Expand google subdomains, as well

This commit is contained in:
Kuba Orlik 2021-12-12 10:58:47 +01:00
parent dbc5192a3c
commit 1ec726f52e

View File

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