Skip to content

Commit

Permalink
feat: track the activity dot experiment, once per session
Browse files Browse the repository at this point in the history
  • Loading branch information
anandaroop committed Dec 30, 2024
1 parent 9b733a1 commit ad75562
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/app/Scenes/HomeView/HomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { navigate } from "app/system/navigation/navigate"
import { getRelayEnvironment } from "app/system/relay/defaultEnvironment"
import { useBottomTabsScrollToTop } from "app/utils/bottomTabsHelper"
import { useExperimentVariant } from "app/utils/experiments/hooks"
import { useActivityDotExperiment } from "app/utils/experiments/useActivityDotExperiment"
import { extractNodes } from "app/utils/extractNodes"
import { useDevToggle } from "app/utils/hooks/useDevToggle"
import { useIsDeepLink } from "app/utils/hooks/useIsDeepLink"
Expand Down Expand Up @@ -60,14 +61,22 @@ export const HomeView: React.FC = memo(() => {

const trackedSectionTypes = HomeViewStore.useStoreState((state) => state.trackedSectionTypes)

const { trackExperiment } = useExperimentVariant("onyx_artwork-card-save-and-follow-cta-redesign")
const { trackExperiment: trackCardRedesignExperiment } = useExperimentVariant(
"onyx_artwork-card-save-and-follow-cta-redesign"
)

useEffect(() => {
if (trackedSectionTypes.includes("HomeViewSectionArtworks")) {
trackExperiment()
trackCardRedesignExperiment()
}
}, [trackedSectionTypes.includes("HomeViewSectionArtworks")])

const { trackExperiment: trackActvityDotExperiment } = useActivityDotExperiment()

useEffect(() => {
trackActvityDotExperiment()
}, [])

const { data, loadNext, hasNext } = usePaginationFragment<
HomeViewQuery,
HomeViewSectionsConnection_viewer$key
Expand Down

0 comments on commit ad75562

Please sign in to comment.