summaryrefslogtreecommitdiffstats
path: root/mobile/android/fenix/app/messaging-fenix.fml.yaml
blob: ac40a5e35b65147027935403ecf0b72fe448085f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
includes:
  - messaging-evergreen-messages.fml.yaml
import:
  - path: ../../android-components/components/service/nimbus/messaging.fml.yaml
    channel: release
    features:
      messaging:
        - value:
            triggers:
              # Using attributes built into the Nimbus SDK
              USER_RECENTLY_INSTALLED: days_since_install < 7
              USER_RECENTLY_UPDATED: days_since_update < 7 && days_since_install != days_since_update
              USER_TIER_ONE_COUNTRY: ('US' in locale || 'GB' in locale || 'CA' in locale || 'DE' in locale || 'FR' in locale)
              USER_EN_SPEAKER: "'en' in locale"
              USER_ES_SPEAKER: "'es' in locale"
              USER_DE_SPEAKER: "'de' in locale"
              USER_FR_SPEAKER: "'fr' in locale"
              DEVICE_ANDROID: os == 'Android'
              DEVICE_IOS: os == 'iOS'
              ALWAYS: "true"
              NEVER: "false"
              DAY_1_AFTER_INSTALL: days_since_install == 1
              DAY_2_AFTER_INSTALL: days_since_install == 2
              DAY_3_AFTER_INSTALL: days_since_install == 3
              DAY_4_AFTER_INSTALL: days_since_install == 4
              DAY_5_AFTER_INSTALL: days_since_install == 5
              MORE_THAN_24H_SINCE_INSTALLED_OR_UPDATED: days_since_update >= 1

              # Using custom attributes for the browser
              I_AM_DEFAULT_BROWSER: "is_default_browser"
              I_AM_NOT_DEFAULT_BROWSER: "is_default_browser == false"

              FUNNEL_PAID: "adjust_campaign != ''"
              FUNNEL_ORGANIC: "adjust_campaign == ''"

              # Using Glean events, specific to the browser
              INACTIVE_1_DAY: "'app_launched'|eventLastSeen('Hours') >= 24"
              INACTIVE_2_DAYS: "'app_launched'|eventLastSeen('Days', 0) >= 2"
              INACTIVE_3_DAYS: "'app_launched'|eventLastSeen('Days', 0) >= 3"
              INACTIVE_4_DAYS: "'app_launched'|eventLastSeen('Days', 0) >= 4"
              INACTIVE_5_DAYS: "'app_launched'|eventLastSeen('Days', 0) >= 5"

              # Behavioral Targeting Events
              RECENTLY_PRINTED:  "'print_tapped'|eventLastSeen('Hours') <= 24"

              # Has the user signed in the last 4 years
              FXA_SIGNED_IN: "'sync_auth.sign_in'|eventLastSeen('Years', 0) <= 4"
              FXA_NOT_SIGNED_IN: "'sync_auth.sign_in'|eventLastSeen('Years', 0) > 4"

              # https://mozilla-hub.atlassian.net/wiki/spaces/FJT/pages/11469471/Core+Active
              USER_INFREQUENT: "'app_launched'|eventCountNonZero('Days', 28) >= 1 && 'app_launched'|eventCountNonZero('Days', 28) < 7"
              USER_CASUAL: "'app_launched'|eventCountNonZero('Days', 28) >= 7 && 'app_launched'|eventCountNonZero('Days', 28) < 14"
              USER_REGULAR: "'app_launched'|eventCountNonZero('Days', 28) >= 14 && 'app_launched'|eventCountNonZero('Days', 28) < 21"
              USER_CORE_ACTIVE: "'app_launched'|eventCountNonZero('Days', 28) >= 21"

              LAUNCHED_ONCE_THIS_WEEK: "'app_launched'|eventSum('Days', 7) == 1"

            actions:
              ENABLE_PRIVATE_BROWSING: ://enable_private_browsing
              INSTALL_SEARCH_WIDGET: ://install_search_widget
              MAKE_DEFAULT_BROWSER: ://make_default_browser
              VIEW_BOOKMARKS: ://urls_bookmarks
              VIEW_COLLECTIONS: ://home_collections
              VIEW_HISTORY: ://urls_history
              VIEW_HOMESCREEN: ://home
              OPEN_SETTINGS_ACCESSIBILITY: ://settings_accessibility
              OPEN_SETTINGS_ADDON_MANAGER: ://settings_addon_manager
              OPEN_SETTINGS_DELETE_BROWSING_DATA: ://settings_delete_browsing_data
              OPEN_SETTINGS_LOGINS: ://settings_logins
              OPEN_SETTINGS_NOTIFICATIONS: ://settings_notifications
              OPEN_SETTINGS_PRIVACY: ://settings_privacy
              OPEN_SETTINGS_SEARCH_ENGINE: ://settings_search_engine
              OPEN_SETTINGS_TRACKING_PROTECTION: ://settings_tracking_protection
              OPEN_SETTINGS_WALLPAPERS: ://settings_wallpapers
              OPEN_SETTINGS: ://settings
              TURN_ON_SYNC: ://turn_on_sync
            styles:
              DEFAULT:
                priority: 50
                max-display-count: 5
              SURVEY:
                priority: 55
                max-display-count: 1
              PERSISTENT:
                priority: 50
                max-display-count: 20
              WARNING:
                priority: 60
                max-display-count: 10
              URGENT:
                priority: 100
                max-display-count: 10
              NOTIFICATION:
                priority: 50
                max-display-count: 1
              MICRO_SURVEY:
                priority: 50
                max-display-count: 5
            $$surfaces:
              - homescreen
              - notification
              - survey
              - microsurvey

        - channel: developer
          value:
            styles:
              DEFAULT:
                priority: 50
                max-display-count: 100
              EXPIRES_QUICKLY:
                priority: 100
                max-display-count: 1
            notification-config:
              refresh-interval: 120 # minutes (2 hours)