From 0e2c8aa7bccf2b3aa9f362520db41019b0999ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 26 Nov 2024 12:48:59 +0000 Subject: [PATCH 1/2] fix: Ensure auto answered nodes track allow list variables --- .../src/pages/FlowEditor/lib/analytics/provider.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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..e04b15a4bc 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/lib/analytics/provider.tsx @@ -386,11 +386,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); }); } }; From 5e782fc82bdcbf2bf1c414960baadb7f414da1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 26 Nov 2024 14:23:09 +0000 Subject: [PATCH 2/2] fix: Update other auto references --- .../src/pages/FlowEditor/lib/analytics/provider.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 e04b15a4bc..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(