-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...rc/main/java/org/wikipedia/analytics/metricsplatform/RecommendedContentAnalyticsHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
package org.wikipedia.analytics.metricsplatform | ||
|
||
import org.wikipedia.util.GeoUtil | ||
import org.wikipedia.util.ReleaseUtil | ||
|
||
// TODO: integrate this with ArticleLinkPreviewInteraction | ||
class RecommendedContentAnalyticsHelper { | ||
|
||
companion object { | ||
private const val RECOMMENDED_CONTENT = "recommendedContent" | ||
val abcTest = RecommendedContentABCTest() | ||
|
||
private val enableCountries = listOf( | ||
// sub-saharan africa | ||
"AO", "BJ", "BW", "IO", "BF", "BI", "CV", "CM", "CF", "TD", "KM", "CG", "IC", "CD", "DJ", "GQ", "ER", | ||
"SZ", "ET", "GA", "GM", "GH", "GN", "GW", "KE", "LS", "LR", "MG", "MW", "ML", "MR", "MU", "YT", "MZ", | ||
"NA", "NE", "NG", "RE", "RW", "SH", "ST", "SN", "SC", "SL", "SO", "ZA", "SS", "TG", "UG", "TZ", "ZM", "ZW", | ||
// south asia | ||
"IN", "PK", "BD", "LK", "MU", "MV", "NP", "BT", "AF" | ||
) | ||
|
||
fun recommendedContentEnabled(): Boolean { | ||
return ReleaseUtil.isPreBetaRelease || enableCountries.contains(GeoUtil.geoIPCountry.orEmpty()) | ||
} | ||
} | ||
} |