:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { useValues } from 'kea'
import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList'
import { AuthorizedUrlListType, authorizedUrlListLogic } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic'
import { OnboardingStepKey } from '~/types'
import { OnboardingStepComponentType } from '../onboardingLogic'
import { OnboardingStep } from '../OnboardingStep'
export const OnboardingWebAnalyticsAuthorizedDomainsStep: OnboardingStepComponentType = () => {
const { authorizedUrls } = useValues(
authorizedUrlListLogic({
actionId: null,
experimentId: null,
productTourId: null,
type: AuthorizedUrlListType.WEB_ANALYTICS,
allowWildCards: false,
})
)
return (
<OnboardingStep
title="Authorized Domains"
stepKey={OnboardingStepKey.AUTHORIZED_DOMAINS}
showSkip
continueDisabledReason={authorizedUrls.length === 0 ? 'Add at least one authorized domain' : undefined}
>
<p>
These are the domains we'll use as breakdown when looking at <b>Web Analytics</b>. Make sure you add all
the domains you'll install PostHog at. These are also the URLs where our toolbar will be enabled.
</p>
<p>
<b>Wildcards are not allowed</b> (example: <code>https://*.posthog.com</code>). The domain needs to be
something concrete that can be launched (example: <code>https://app.posthog.com</code>).
</p>
<AuthorizedUrlList
type={AuthorizedUrlListType.WEB_ANALYTICS}
allowWildCards={false}
displaySuggestions={false}
showLaunch={false}
/>
</OnboardingStep>
)
}
OnboardingWebAnalyticsAuthorizedDomainsStep.stepKey = OnboardingStepKey.AUTHORIZED_DOMAINS