From d54e2d8ff1eb3f5a49163c6008374ff3bf362ee7 Mon Sep 17 00:00:00 2001 From: Robbie Coomber Date: Wed, 22 Nov 2023 19:32:59 +0000 Subject: [PATCH] Support github geoip plugin url --- frontend/src/scenes/web-analytics/webAnalyticsLogic.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts b/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts index 845629e3d7037..ac41d8398f921 100644 --- a/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts +++ b/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts @@ -90,6 +90,11 @@ export interface WebAnalyticsStatusCheck { shouldWarnAboutNoPageleaves: boolean } +export const GEOIP_PLUGIN_URLS = [ + 'https://github.com/PostHog/posthog-plugin-geoip', + 'https://www.npmjs.com/package/@posthog/geoip-plugin', +] + export const initialWebAnalyticsFilter = [] as WebAnalyticsPropertyFilters export const webAnalyticsLogic = kea([ @@ -718,9 +723,7 @@ export const webAnalyticsLogic = kea([ const geoIpPlugin = pluginsResponse.status === 'fulfilled' && - pluginsResponse.value.find( - (plugin) => plugin.url === 'https://www.npmjs.com/package/@posthog/geoip-plugin' - ) + pluginsResponse.value.find((plugin) => GEOIP_PLUGIN_URLS.includes(plugin.url)) const geoIpPluginId = geoIpPlugin ? geoIpPlugin.id : undefined const geoIpPluginConfig =