- id: WNP_MOMENTS_8
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until August 3rd EOD
        expire: 1596499200000
        url: https://www.mozilla.org/firefox/welcome/8
      id: moments-wnp
    bucket_id: WNP_MOMENTS_8
  # Fx 70+, profile age > 30 days all en-* and selected locales
  targeting: firefoxVersion >= 70 &&
    (
      localeLanguageCode == "en" ||
      locale in ["cy", "de", "dsb", "es-AR", "fr", "fy-NL", "hsb", "hu", "ia", "it", "ka", "kab", "nb-NO", "nl", "nn-NO", "pl", "pt-BR", "ru", "sl", "sv-SE", "tr", "uk", "vi", "zh-TW"]
    ) && ((currentDate|date - profileAgeCreated) / 86400000) > 30
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_7
  groups: [moments-pages]
  content:
    action:
      data:
        expireDelta: 604800000
        url: https://www.mozilla.org/firefox/welcome/7/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_7
  # Fx 69+, profile age > 30 days all en-* and selected locales
  targeting: firefoxVersion >= 69 &&
    (
      localeLanguageCode == "en" ||
      locale in ["be", "cy", "da", "de", "dsb", "es-AR", "es-CL", "es-ES", "es-MX", "fr", "fy-NL", "gn", "hr", "hsb", "hu", "hy-AM", "ia", "id", "it", "ka", "kab", "nl", "nn-NO", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sq", "sr", "sv-SE", "tr", "uk", "vi", "zh-TW"]
    ) && ((currentDate|date - profileAgeCreated) / 86400000) > 30
    &&  xpinstallEnabled &&
    (['@contain-facebook','{bb1b80be-e6b3-40a1-9b6e-9d4073343f0b}', '{a50d61ca-d27b-437a-8b52-5fd801a0a88b}'] intersect addonsInfo.addons|keys)|length == 0
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_2
  groups: [moments-pages]
  content:
    action:
      data:
        expireDelta: 604800000
        url: https://www.mozilla.org/firefox/welcome/2/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_2
  targeting: firefoxVersion >= 69 && localeLanguageCode in ["en","fr","de"] && ((currentDate|date
    - profileAgeCreated) / 86400000) >= 17 && ((currentDate|date - profileAgeCreated)
    / 86400000) < 30 && firefoxVersion < 89
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_1
  groups: [moments-pages]
  content:
    action:
      data:
        expireDelta: 604800000
        url: https://www.mozilla.org/firefox/welcome/1/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_1
  targeting: firefoxVersion >= 69 && localeLanguageCode in ["en","fr","de"] && ((currentDate|date
    - profileAgeCreated) / 86400000) >= 4 && ((currentDate|date - profileAgeCreated)
    / 86400000) < 15 && firefoxVersion < 89
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_4
  groups: [moments-pages]
  content:
    action:
      data:
        expireDelta: 604800000
        url: https://www.mozilla.org/firefox/welcome/4/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_4
  targeting: firefoxVersion >= 69 && localeLanguageCode in ["en", "fr", "de"] &&
    ((currentDate|date - profileAgeCreated) / 86400000) > 30 && firefoxVersion < 89
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_9
  groups: [moments-pages]
  content:
    action:
      data:
        expireDelta: 604800000
        url: https://www.mozilla.org/%LOCALE%/firefox/welcome/9/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_9
  targeting: firefoxVersion >= 86 && localeLanguageCode in ["fr", "de"] && region in ["FR", "DE", "US"] && firefoxVersion < 89 && ((currentDate|date - profileAgeCreated) / 86400000) > 30
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_9_89
  groups: [moments-pages]
  content:
    action:
      data:
        # run the campaign until June 25th
        # https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/browser/components/BrowserContentHandler.jsm#686
        expire: 1624579200000
        url: https://www.mozilla.org/%LOCALE%/firefox/welcome/9/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_9_89
  # e6eb0d1e856335fc is the identifier for Mozilla VPN
  targeting: firefoxVersion >= 89 && firefoxVersion < 90 && localeLanguageCode in ["fr", "de"] && region in ["FR", "DE", "US"] && ((currentDate|date - profileAgeCreated) / 86400000) > 30 && usesFirefoxSync && !("e6eb0d1e856335fc" in attachedFxAOAuthClients|mapToProperty("id"))
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_10
  groups: [moments-pages]
  content:
    action:
      data:
        # run the campaign for 3 weeks until July 13th
        # https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/browser/components/BrowserContentHandler.jsm#686
        expire: 1627603200000
        url: https://www.mozilla.org/firefox/welcome/10/
      id: moments-wnp
    bucket_id: WNP_MOMENTS_10
  targeting: localeLanguageCode == 'en' && region in ['US', 'CA', 'GB', 'NZ', 'SG', 'MY'] && userPrefs.cfrFeatures && firefoxVersion < 90 && firefoxVersion >= 86
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_9
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until November 29th EOD
        expire: 1638144000000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/9
      id: moments-wnp
    bucket_id: WNP_MOMENTS_9
  targeting: localeLanguageCode in ["fr", "de"] &&
    region in ["DE", "AT", "BE", "CA", "FR", "IE", "IT", "MY", "NL", "NZ", "SG", "ES", "CH", "US", "GB"] &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_10
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until November 29th EOD
        expire: 1638144000000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/10
      id: moments-wnp
    bucket_id: WNP_MOMENTS_10
  targeting: (localeLanguageCode in ["en", "nl", "it"] || locale == "es-ES") &&
    region in ["DE", "AT", "BE", "CA", "FR", "IE", "IT", "MY", "NL", "NZ", "SG", "ES", "CH", "US", "GB"]  &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_11
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until December 15th EOD
        expire: 1639526400000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/11
      id: moments-wnp
    bucket_id: WNP_MOMENTS_11
  targeting: localeLanguageCode in ["en", "de", "fr", "nl", "it"] &&
    region in ["DE", "AT", "BE", "CA", "FR", "IE", "IT", "MY", "NL", "NZ", "SG", "CH", "US", "GB", "ES"]  &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_12
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until December 31th EOD
        expire: 1640908800000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/12
      id: moments-wnp
    bucket_id: WNP_MOMENTS_12
  # multi-account container EN only
  targeting: localeLanguageCode == "en" &&
    region in ["DE", "AT", "BE", "CA", "FR", "IE", "IT", "MY", "NL", "NZ", "SG", "CH", "US", "GB", "ES"]  &&
    (addonsInfo.addons|keys intersect ["@testpilot-containers"])|length == 1 &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_13
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until December 31th EOD
        expire: 1640908800000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/13
      id: moments-wnp
    bucket_id: WNP_MOMENTS_13
  targeting: (localeLanguageCode in ["en", "de", "fr", "nl", "it", "ms"] || locale == "es-ES") &&
    region in ["DE", "AT", "BE", "CA", "FR", "IE", "IT", "MY", "NL", "NZ", "SG", "CH", "US", "GB", "ES"]  &&
    (addonsInfo.addons|keys intersect ["@testpilot-containers"])|length == 0 &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
- id: WNP_MOMENTS_14
  groups: [moments-pages]
  content:
    action:
      data:
        # Valid until 2022 November 14 EOD (coupon expiry)
        expire: 1668470400000
        # URL will redirect to correct locale based on browser settings
        url: https://www.mozilla.org/firefox/welcome/14
      id: moments-wnp
    bucket_id: WNP_MOMENTS_14
  targeting: localeLanguageCode in ["en", "de", "fr"] &&
    region in ["AT", "BE", "CA", "CH", "DE", "ES", "FI", "FR", "GB", "IE", "IT", "MY", "NL", "NZ", "SE", "SG", "US"]  &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
    'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons'|preferenceValue
  template: update_action
  trigger:
    id: momentsUpdate
