Skip to content

Commit

Permalink
Support github geoip plugin url
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Nov 22, 2023
1 parent c546960 commit d54e2d8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/scenes/web-analytics/webAnalyticsLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<webAnalyticsLogicType>([
Expand Down Expand Up @@ -718,9 +723,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([

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 =
Expand Down

0 comments on commit d54e2d8

Please sign in to comment.