From ca8db89f6a76e2c2dda25bb433e673f2d6aeeedc Mon Sep 17 00:00:00 2001 From: gitanjli525 Date: Thu, 7 Nov 2024 12:09:23 +0530 Subject: [PATCH] chore: hotfix analytics sessionizer bugs --- .../PaymentsAnalytics/PaymentAnalytics.res | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res index e8031b940..849bce234 100644 --- a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res +++ b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res @@ -24,7 +24,18 @@ let make = () => { try { let infoUrl = getURL(~entityName=ANALYTICS_PAYMENTS, ~methodType=Get, ~id=Some(domain)) let infoDetails = await fetchDetails(infoUrl) - setMetrics(_ => infoDetails->getDictFromJsonObject->getArrayFromDict("metrics", [])) + // Need to be removed + let ignoreSessionizedPayment = + infoDetails + ->getDictFromJsonObject + ->getArrayFromDict("metrics", []) + ->Array.filter(ele => { + let metricName = ele->getDictFromJsonObject->getString("name", "") + !String.includes(metricName, "sessionized") && + metricName != "failure_reasons" && + metricName != "payments_distribution" + }) + setMetrics(_ => ignoreSessionizedPayment) setDimensions(_ => infoDetails->getDictFromJsonObject->getArrayFromDict("dimensions", [])) setScreenState(_ => PageLoaderWrapper.Success) } catch {