From 3e24775a2915c3f4efa15d8dbdd8b6a8b17e145c Mon Sep 17 00:00:00 2001 From: Justin Wyne <1986068+wyne@users.noreply.github.com> Date: Sun, 4 Aug 2024 01:20:36 -0700 Subject: [PATCH] Review prompt 30d, align analytics --- src/components/Buttons/HomeButton.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/Buttons/HomeButton.tsx b/src/components/Buttons/HomeButton.tsx index 3ad297a8..42dd836e 100644 --- a/src/components/Buttons/HomeButton.tsx +++ b/src/components/Buttons/HomeButton.tsx @@ -29,19 +29,20 @@ const HomeButton: React.FunctionComponent = ({ navigation }) => { const daysSinceLastPrompt = (now - lastStoreReviewPrompt) / (1000 * 60 * 60 * 24); if (gameCount < 3) { return; } - if (daysSinceLastPrompt < 90) { return; } + if (daysSinceLastPrompt < 30) { return; } - await logEvent('review_prompt', { - daysSinceLastPrompt, - gameCount, - installId - }); - - dispatch(setLastStoreReviewPrompt(Date.now())); const isAvailable = await StoreReview.isAvailableAsync(); if (isAvailable) { + await logEvent('review_prompt', { + daysSinceLastPrompt, + gameCount, + installId + }); + + dispatch(setLastStoreReviewPrompt(Date.now())); + const platform = Platform.OS; if (platform === 'ios') { StoreReview.requestReview();