diff --git a/client/my-sites/stats/features/modules/stats-devices/stats-module-devices.tsx b/client/my-sites/stats/features/modules/stats-devices/stats-module-devices.tsx index 3b4c65456bf13..69cc0d6f11dab 100644 --- a/client/my-sites/stats/features/modules/stats-devices/stats-module-devices.tsx +++ b/client/my-sites/stats/features/modules/stats-devices/stats-module-devices.tsx @@ -10,9 +10,10 @@ import PieChart from 'calypso/components/pie-chart'; import PieChartLegend from 'calypso/components/pie-chart/legend'; import StatsInfoArea from 'calypso/my-sites/stats/features/modules/shared/stats-info-area'; import { useSelector } from 'calypso/state'; +import { isJetpackSite } from 'calypso/state/sites/selectors'; import { getSelectedSiteId } from 'calypso/state/ui/selectors'; import EmptyModuleCard from '../../../components/empty-module-card/empty-module-card'; -import { JETPACK_SUPPORT_URL_TRAFFIC } from '../../../const'; +import { JETPACK_SUPPORT_URL_TRAFFIC, SUPPORT_URL } from '../../../const'; import useModuleDevicesQuery, { StatsDevicesData } from '../../../hooks/use-modeule-devices-query'; import { QueryStatsParams } from '../../../hooks/utils'; import StatsListCard from '../../../stats-list/stats-list-card'; @@ -151,6 +152,14 @@ const StatsModuleDevices: React.FC< StatsModuleDevicesProps > = ( { /> ); + const isSiteJetpackNotAtomic = useSelector( ( state ) => + isJetpackSite( state, siteId, { treatAtomicAsJetpackSite: false } ) + ); + + const supportUrl = isSiteJetpackNotAtomic + ? localizeUrl( `${ JETPACK_SUPPORT_URL_TRAFFIC }#devices-stats` ) + : localizeUrl( `${ SUPPORT_URL }#devices` ); + const titleNodes = ( { translate( @@ -158,13 +167,7 @@ const StatsModuleDevices: React.FC< StatsModuleDevicesProps > = ( { { comment: '{{link}} links to support documentation.', components: { - link: ( - - ), + link: , }, context: 'Stats: Info popover content when the Devices module has data.', } @@ -201,15 +204,7 @@ const StatsModuleDevices: React.FC< StatsModuleDevicesProps > = ( { { comment: '{{link}} links to support documentation.', components: { - link: ( - - ), + link: , }, context: 'Stats: Info box label when the Devices module is empty', } diff --git a/client/my-sites/stats/features/modules/stats-utm/stats-module-utm.jsx b/client/my-sites/stats/features/modules/stats-utm/stats-module-utm.jsx index 02a137a845abe..cb1081f737245 100644 --- a/client/my-sites/stats/features/modules/stats-utm/stats-module-utm.jsx +++ b/client/my-sites/stats/features/modules/stats-utm/stats-module-utm.jsx @@ -7,10 +7,10 @@ import { useTranslate } from 'i18n-calypso'; import { useState } from 'react'; import StatsInfoArea from 'calypso/my-sites/stats/features/modules/shared/stats-info-area'; import { useSelector } from 'calypso/state'; -import { getSiteSlug } from 'calypso/state/sites/selectors'; +import { getSiteSlug, isJetpackSite } from 'calypso/state/sites/selectors'; import { getSelectedSiteId } from 'calypso/state/ui/selectors'; import EmptyModuleCard from '../../../components/empty-module-card/empty-module-card'; -import { JETPACK_SUPPORT_URL_TRAFFIC } from '../../../const'; +import { JETPACK_SUPPORT_URL_TRAFFIC, SUPPORT_URL } from '../../../const'; import useUTMMetricsQuery from '../../../hooks/use-utm-metrics-query'; import ErrorPanel from '../../../stats-error'; import StatsListCard from '../../../stats-list/stats-list-card'; @@ -129,6 +129,14 @@ const StatsModuleUTM = ( { ? generateFileNameForDownload( siteSlug, period ) : ''; + const isSiteJetpackNotAtomic = useSelector( ( state ) => + isJetpackSite( state, siteId, { treatAtomicAsJetpackSite: false } ) + ); + + const supportUrl = isSiteJetpackNotAtomic + ? localizeUrl( `${ JETPACK_SUPPORT_URL_TRAFFIC }#harnessing-utm-stats-for-precision-tracking` ) + : localizeUrl( `${ SUPPORT_URL }#utm` ); + const titleNodes = ( { translate( @@ -136,15 +144,7 @@ const StatsModuleUTM = ( { { comment: '{{link}} links to support documentation.', components: { - link: ( - - ), + link: , }, context: 'Stats: Popover information when the UTM module has data', } @@ -179,15 +179,7 @@ const StatsModuleUTM = ( { { comment: '{{link}} links to support documentation.', components: { - link: ( - - ), + link: , }, context: 'Stats: Info box label when the UTM module is empty', }