Moments Page
What are Moments pages?
Moments Page is a web page URL that’s loaded for existing Firefox Desktop users on subsequent startup for user profiles meeting the targeting specified in moments message config.
Moments Pages are different from WNP (What’s New Page) that shows up when users update to a new major version based on configurations built into the executable for that channel/build. Moments are shown outside of an upgrade on regular restarts and are remotely configurable via Messaging System.
The constraint of synchronous start-up behavior prevents waiting for Remote Settings to make a targeting decision resulting in “Moments” shown on subsequent start-ups.
Startup pref lifecycle
The process of selecting/blocking/showing is as follows:
At the start of any
“update”
cycle (i.e. on a regular interval, and preferably when remote settings updates):Check the override pref
browser.startup.homepage_override.once
; if a message ID is set, unblock that message since it has not yet been shown. Clear the override pref.Run messages through targeting and select a message.
Set the message with expiration data in the pref.
Block the message that was chosen immediately.
When the message is shown at startup:
Clear the override pref.
Example of a Moments page
Testing Moments Page
Via the dev tools:
In the search tab go to
about:config
, setbrowser.newtabpage.activity-stream.asrouter.devtoolsEnabled
totrue
Open a new tab, in the search tab go to
about:asrouter
In devtools, select and show messages from
panel_local_testing
as providerYou should see example JSON messages with
"template": "update_action"
. You can directly modify the message in the text area with your changes or by pasting your custom message JSON. For testing, please keepid
property in config same as respective message modified.Clicking
Modify
updates the override prefbrowser.startup.homepage_override.once
and configures the Messaging System to open moments url in message config on next browser restart.Ensure that all required properties are covered according to the Moments Schema
Restart firefox and your moments page should pop up on re-run
Via Experiments:
You can test the moments page by creating an experiment. Messaging Journey captures creating experiments via Nimbus.
Example JSON for Moments page
{
"groups": [
"moments-pages"
],
"content": {
"action": {
"id": "moments-wnp",
"data": {
"url": "https://www.mozilla.org/firefox/welcome/12",
"expireDelta": 172800000
}
}
},
"trigger": {
"id": "momentsUpdate"
},
"template": "update_action",
"targeting": "true",
"id": "WNP_THANK_YOU"
}