diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx b/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx index f6c3d46b72..548413c5d3 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx @@ -198,9 +198,7 @@ export const AnalyticsProvider: React.FC<{ children: React.ReactNode }> = ({ const { id, created_at: newLogCreatedAt } = result?.data.insert_analytics_logs_one || {}; - if (!id || !newLogCreatedAt) { - return; - } + if (!id || !newLogCreatedAt) return; if ( lastVisibleNodeAnalyticsLogId && @@ -213,9 +211,7 @@ export const AnalyticsProvider: React.FC<{ children: React.ReactNode }> = ({ ); } - if (!metadata.isAutoAnswered) { - lastVisibleNodeAnalyticsLogId = id; - } + lastVisibleNodeAnalyticsLogId = id; } async function insertNewAnalyticsLog( @@ -386,11 +382,7 @@ export const AnalyticsProvider: React.FC<{ children: React.ReactNode }> = ({ updatedBreadcrumbKeys.forEach((breadcrumbKey) => { const breadcrumb = breadcrumbs[breadcrumbKey]; - if (breadcrumb.auto) { - track(breadcrumbKey); - } else { - updateLastVisibleNodeLogWithAllowListAnswers(breadcrumbKey, breadcrumb); - } + updateLastVisibleNodeLogWithAllowListAnswers(breadcrumbKey, breadcrumb); }); } };