On this page

Config and Advanced Options

A monitor’s Config contains parameters in JSON format. The parameters are used to extract monitored content from a webpage.

How to view config?

You can navigate to the config of a monitor from the Options window. Here are the steps to view the config:

  1. Click on the down caret icon for a Monitor to view quick action items.

  2. Click on Edit Options. This opens the Options window.

    Screenshot of a monitor's quick action menu: Edit Options, Duplicate, its actions, Action Log, Move to Trash and Delete forever. Edit Options is outlined in orange.

  3. Click the gear icon next to Open Webpage Selector and the config view opens. This contains page options, selected and deselected elements of your selector.

    Screenshot of the Source section of a monitor's options with the config view open below it: the Configuration and Config JSON tabs, Page options, Selected with the CSS selector #plan-pro, Deselected and Regex Text Filter. The gear button next to Open Webpage Selector is outlined in orange.

You have the option to edit your monitor configuration either in the Config view or with a Config JSON.

Config parameters

When a monitor is added, Distill creates a config automatically. Following are the parameters in the config with a default value. You can change the default value to match your requirements.

  1. index: Generated by default. Its value is based on selection. For selection inside an iframe, the index should match with that of iframe’s index.
  2. excludes: List of selectors for excluded selections.
  3. includes: List of selectors for included selections.
  4. type: The selector type: css, xpath, js or xcss. The default is css.
  5. expr: Selector expression for the selected or excluded text.
  6. dynamic: Can be set to “true” or “false”. True value loads dynamic content of webpages while false does not.
  7. delay: Distill waits for the delay period before checking a page for a change. By default, this is set to 2. The value is in seconds. The Wait for duration field accepts 0 to 30.
  8. ignoreEmptyText: By default, this is set to true. In this case, when the selected element does not contain any text, Distill registers an error with error code “SELECTION_EMPTY” in the error-log. If you would like to consider empty text as a change, set it to false.
  9. includeStyle: Set to false by default. If set to true, Distill includes the webpage’s stylesheet in extracted data.
  10. incognito: If set to true, the monitor runs in an Incognito tab. Only available for monitors that run in the Desktop app.
  11. blockAdsAndCookies: Blocks ads and cookie banners during the check. Only available for cloud monitors. On by default.
  12. solveCaptcha: If set to true, Distill tries to solve a captcha it detects during the check. Only available for cloud monitors.
  13. regexp: Keeps only the text that matches a regular expression, with expr for the expression and flags for its flags. The matches are joined with spaces. If nothing matches, the text is empty.

Page options

Page options, at the top of the config view, sets these options without editing the JSON:

  • Wait for duration sets delay.
  • Enable Javascript sets dynamic. When you turn it off, the wait is set to 0. When you turn it back on, the previous wait comes back.
  • Incognito sets incognito.
  • Include page styles sets includeStyle. Turn it off for faster checks. The Styled option in Change History shows these styles when they are available.
  • Block ads and cookies sets blockAdsAndCookies. Ads and cookie banners need JavaScript to appear, so this option matters only when Enable Javascript is on.
  • Auto solve captcha sets solveCaptcha.

Set regexp in Regex Text Filter, below the selections. Its flags are gim by default.

How to wait for a page to finish loading before extracting content?

Sometimes, web pages or specific sections of a page may take longer to load. If monitored using the default settings, Distill may not be able to find the content during its check, resulting in incomplete or erroneous data. To address this issue, you can increase the delay setting in the monitor’s config. This will instruct Distill to wait for the specified delay time (in seconds) while the page’s content loads before checking it. You can test out with different delay values and check what works best for that page. You can add a delay either in the configuration UI or add it in the Config JSON.

Method 1: To set a delay in Configuration:

  1. Click the gear icon next to the Open Webpage Selector button. The config view opens with Page options at the top.

  2. Enter the delay in seconds in Wait for duration.

    Screenshot of Page options in a monitor's config view: Wait for duration set to 2 secs, then switches for Enable Javascript, Incognito, Include page styles, Block ads and cookies and Auto solve captcha. The Wait for duration field is outlined in orange.

  3. Click Save at the bottom of the options page.

Method 2: To set a delay with Config JSON:

  1. In the config view, click the Config JSON tab. The config opens as JSON in an editor.

    Screenshot of a monitor's config view with the Config JSON tab selected and outlined, showing the start of the config JSON.

  2. Find the delay parameter, inside the selections entry: "delay": 2. It has a default value of 2 or 0 depending on the device.

  3. Change delay to a higher number, such as 10 or 12, and click Save at the bottom of the options page.

How to make changes in the config in bulk?

You can use the Batch Edit feature to update the config of multiple monitors at once.

Here are the steps to follow:

  1. Select the monitors for which you want to apply the new config.
  2. Click on Batch Edit → Config.
  3. Paste the new config and save.

All selected monitors must be of the same type. Otherwise, Distill shows “can’t batch update config of monitors of different content types”.

Screenshot of the Watchlist with two monitors selected and the Batch Edit menu open. Badge 1 marks the checkbox of the Pricing | Northwind Cloud monitor, badge 2 the Batch Edit button and badge 3 Config in its menu.

For the other options in Batch Edit, such as actions, schedule and device, see Batch Edit.

Was this article helpful? Leave a feedback here.