Using ASRouter Devtools¶
How to enable ASRouter devtools¶
about:newtab#asrouterto see the devtools.
Overview of ASRouter devtools¶
How to enable/disable a provider¶
To enable a provider such as
snippets, Look at the list of “Message Providers” at the top of the page. Make sure the checkbox is checked next to the provider you want to enable.
To disable it, uncheck the checkbox. You should see a red label indicating the provider is now disabled.
How to see all messages from a provider¶
(Only available in Firefox 65+)
In order to see all active messages for a current provider such as
snippets, use the drop down selector under the “Messages” section. Select the name of the provider you are interested in.
The messages on the page should now be filtered to include only the provider you selected.
How to test telemetry pings¶
To test telemetry pings, complete the the following steps:
In about:config, set:
Open the Browser Toolbox devtools (Tools > Web Developer > Browser Toolbox) and switch to the console tab. Add a filter for for
activity-streamto only display relevant pings:
You should now see pings show up as you view/interact with ASR messages/templates.
How to view preview URLs¶
Follow these steps to view preview URLs (e.g.
You can preview in the two different themes (light and dark) by adding
&theme=light at the end of the url.
Links to URLs starting with
about:newtabcannot be clicked on directly. They must be copy and pasted into the address bar.
Previews should only be tested in
Firefox 64and later.
The endpoint must be HTTPS, the host must be allowed (see testing instructions below)
Errors are surfaced in the
Consoletab of the
If your endpoint URL has a host name of
snippets-admin.mozilla.org, you can paste the URL into the address bar view it without any further steps.
If your endpoint URL starts with some other host name, it must be allowed. Open the Browser Toolbox devtools (Tools > Developer > Browser Toolbox) and paste the following code (where
gist.githubusercontent.comis the hostname of your endpoint URL):
Services.prefs.setStringPref( "browser.newtab.activity-stream.asrouter.allowHosts", "[\"gist.githubusercontent.com\"]" );
Restart the browser
You should now be able to paste the URL into the address bar and view it.