Skip to content

Commit

Permalink
Merge pull request #7307 from google/fix/7306-wp-dashboard
Browse files Browse the repository at this point in the history
Fix UA side-effect on WP dashboard
  • Loading branch information
techanvil authored Jul 14, 2023
2 parents 7396d8f + f4515de commit f786a44
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions assets/js/components/wp-dashboard/WPDashboardWidgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ export default function WPDashboardWidgets() {
}
) }
>
{ analyticsModuleActiveAndConnected && ! isGA4DashboardView && (
<Fragment>
<WPDashboardUniqueVisitorsWidget />
<WPDashboardSessionDurationWidget />
</Fragment>
) }
{ analyticsModuleActiveAndConnected &&
isGA4DashboardView === false && (
<Fragment>
<WPDashboardUniqueVisitorsWidget />
<WPDashboardSessionDurationWidget />
</Fragment>
) }

{ isGA4DashboardView && (
<Fragment>
Expand All @@ -142,12 +143,13 @@ export default function WPDashboardWidgets() {
</div>
) }

{ analyticsModuleActiveAndConnected && ! isGA4DashboardView && (
<Fragment>
<WPDashboardUniqueVisitorsChartWidget />
<WPDashboardPopularPagesWidget />
</Fragment>
) }
{ analyticsModuleActiveAndConnected &&
isGA4DashboardView === false && (
<Fragment>
<WPDashboardUniqueVisitorsChartWidget />
<WPDashboardPopularPagesWidget />
</Fragment>
) }

{ isGA4DashboardView && (
<Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default function AnalyticsStats( props ) {
];
}

if ( ! isGA4DashboardView ) {
if ( isGA4DashboardView === false ) {
dateMarkers = [
{
date: UA_CUTOFF_DATE,
Expand Down

0 comments on commit f786a44

Please sign in to comment.