diff --git a/src/hooks/useAppInsights.js b/src/hooks/useAppInsights.js index 064460a93..c6e9f4a3b 100644 --- a/src/hooks/useAppInsights.js +++ b/src/hooks/useAppInsights.js @@ -21,6 +21,14 @@ export default function useAppInsights() { ai.loadAppInsights(); ai.addTelemetryInitializer((item) => { item.tags['ai.cloud.role'] = 'SSW.Rules-StaticClientPage'; + + if ( + item.baseData?.target?.includes('analytics.google.com') && + item.baseData?.responseCode == 0 + ) { + // mark these as successful requests as per this comment - https://github.com/SSWConsulting/SSW.Rules/issues/1589#issuecomment-2437107468 + item.baseData.success = true; + } }); }