diff --git a/api/src/controllers/appMilestone.js b/api/src/controllers/appMilestone.js index 7b8b8aed2..9ed5423c3 100644 --- a/api/src/controllers/appMilestone.js +++ b/api/src/controllers/appMilestone.js @@ -74,6 +74,11 @@ router.post( "Si vous avez choisi d'être abstinent, vous pouvez désormais voir votre nombre de jours consécutifs sans avoir consommé d'alcool. Rendez-vous dans l'onglet calendrier !", CTATitle: "Découvrir", CTANavigation: ["ABSTINENCE_SELECTION"], + CTAEvent: { + category: "ABSTINENCE_SELECTION", + action: "PRESSED_FROM_NEW_FEATURE_MODAL", + name: "FROM_NEW_FEATURE", + }, }, }); } diff --git a/app/src/scenes/Gains/AbstinenceSelection.js b/app/src/scenes/Gains/AbstinenceSelection.js index fdb862c53..8a1d94261 100644 --- a/app/src/scenes/Gains/AbstinenceSelection.js +++ b/app/src/scenes/Gains/AbstinenceSelection.js @@ -1,6 +1,6 @@ import React from 'react'; import { View, Text, SafeAreaView, TouchableOpacity, Dimensions } from 'react-native'; - +import { logEvent } from '../../services/logEventsWithMatomo'; import { storage } from '../../services/storage'; const AbstinenceSelection = ({ navigation, route }) => { @@ -39,6 +39,10 @@ const AbstinenceSelection = ({ navigation, route }) => { onPress={() => { onClose(); storage.set('@isAbstinent', true); + logEvent({ + category: 'ABSTINENCE_SELECTION', + action: 'ABSTINENCE_SELECTION_YES', + }); }}> Oui @@ -47,6 +51,10 @@ const AbstinenceSelection = ({ navigation, route }) => { onPress={() => { onClose(); storage.set('@isAbstinent', false); + logEvent({ + category: 'ABSTINENCE_SELECTION', + action: 'ABSTINENCE_SELECTION_NO', + }); }}> Non