diff --git a/content/billing/managing-licenses-for-visual-studio-subscriptions-with-github-enterprise/about-visual-studio-subscriptions-with-github-enterprise.md b/content/billing/managing-licenses-for-visual-studio-subscriptions-with-github-enterprise/about-visual-studio-subscriptions-with-github-enterprise.md index b72f3bfdc6..9ee8a21c06 100644 --- a/content/billing/managing-licenses-for-visual-studio-subscriptions-with-github-enterprise/about-visual-studio-subscriptions-with-github-enterprise.md +++ b/content/billing/managing-licenses-for-visual-studio-subscriptions-with-github-enterprise/about-visual-studio-subscriptions-with-github-enterprise.md @@ -29,7 +29,7 @@ For more information about the setup of {% data variables.visual_studio.prodname ## About licenses for {% data variables.visual_studio.prodname_vss_ghec %} -After you assign a license for {% data variables.visual_studio.prodname_vss_ghec %} to a subscriber, the subscriber will use the {% data variables.product.prodname_enterprise %} portion of the license by joining an organization in your enterprise with a personal account on {% data variables.product.prodname_dotcom_the_website %}. If the verified email address for the personal account of an enterprise member on {% data variables.product.prodname_dotcom_the_website %} matches the User Primary Name (UPN) for a subscriber to your {% data variables.product.prodname_vs %} account, the {% data variables.product.prodname_vs %} subscriber will automatically consume one license for {% data variables.visual_studio.prodname_vss_ghec %}. +After you assign a license for {% data variables.visual_studio.prodname_vss_ghec %} to a subscriber, the subscriber will use the {% data variables.product.prodname_enterprise %} portion of the license by joining an organization in your enterprise with a personal account on {% data variables.product.prodname_dotcom_the_website %}. If the verified email address for the personal account of an enterprise member on {% data variables.product.prodname_dotcom_the_website %} matches the User Principal Name (UPN) for a subscriber to your {% data variables.product.prodname_vs %} account, the {% data variables.product.prodname_vs %} subscriber will automatically consume one license for {% data variables.visual_studio.prodname_vss_ghec %}. {% note %} diff --git a/src/events/lib/schema.js b/src/events/lib/schema.js index b94b805269..fda06a733d 100644 --- a/src/events/lib/schema.js +++ b/src/events/lib/schema.js @@ -405,7 +405,6 @@ const experiment = { }, experiment_variation: { type: 'string', - enum: ['control', 'treatment'], description: 'The variation this user we bucketed in, such as control or treatment.', }, experiment_success: { diff --git a/src/landings/components/MeasureLanguageCookieMatch.ts b/src/landings/components/MeasureLanguageCookieMatch.ts new file mode 100644 index 0000000000..fc937992d1 --- /dev/null +++ b/src/landings/components/MeasureLanguageCookieMatch.ts @@ -0,0 +1,47 @@ +/** + * This component tests if the user has a language cookie whose + * value does not match the current URL. For example, the user has, + * at some point, explictitly selected a language in the drop-down + * but is now on a URL whose language prefix is not the same. + * We're curious to see how often this happens in the wild. + * + * This experiment is meant to be temporary. At least until we know and + * have documented how often this happens. + * + */ + +import { useEffect } from 'react' +import { useRouter } from 'next/router' +import Cookies from 'js-cookie' + +import { sendEvent, EventType } from 'src/events/components/events' + +const EXPERIMENT_NAME = 'language_cookie_match' + +const COOKIE_KEY = 'user_language' + +function sendExperimentResult(desiredLanguage: string, matched: boolean) { + sendEvent({ + type: EventType.experiment, + experiment_name: EXPERIMENT_NAME, + experiment_variation: desiredLanguage, + experiment_success: matched, + }) +} + +export function MeasureLanguageCookieMismatch() { + const { locale } = useRouter() + + useEffect(() => { + try { + const cookie = Cookies.get(COOKIE_KEY) + if (cookie) { + sendExperimentResult(cookie, cookie === locale) + } + } catch (error) { + console.error('Error measuring language cookie match', error) + } + }, [locale]) + + return null +} diff --git a/src/landings/pages/home.tsx b/src/landings/pages/home.tsx index 728485237e..08c64b6213 100644 --- a/src/landings/pages/home.tsx +++ b/src/landings/pages/home.tsx @@ -14,6 +14,7 @@ import { ArticleList } from 'src/landings/components/ArticleList' import { HomePageHero } from 'src/landings/components/HomePageHero' import type { ProductGroupT } from 'src/landings/components/ProductSelections' import { ProductSelections } from 'src/landings/components/ProductSelections' +import { MeasureLanguageCookieMismatch } from '../components/MeasureLanguageCookieMatch' type FeaturedLink = { href: string @@ -72,6 +73,7 @@ function HomePage(props: HomePageProps) { + ) diff --git a/src/landings/pages/product.tsx b/src/landings/pages/product.tsx index 5f19a7e697..981c1e082e 100644 --- a/src/landings/pages/product.tsx +++ b/src/landings/pages/product.tsx @@ -6,6 +6,7 @@ import { useRouter } from 'next/router' import copyCode from 'src/frame/components/lib/copy-code' import toggleAnnotation from 'src/frame/components/lib/toggle-annotations' import wrapCodeTerms from 'src/frame/components/lib/wrap-code-terms' +import { MeasureLanguageCookieMismatch } from '../components/MeasureLanguageCookieMatch' import { MainContextT, @@ -109,7 +110,12 @@ const GlobalPage = ({ } } - return {content} + return ( + + {content} + + + ) } export default GlobalPage