Top
How to disable Product Analytics on specific domains?
  • 25 Sep 2025
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

How to disable Product Analytics on specific domains?

  • Dark
    Light
  • PDF

Article summary

Disable Product Analytics on specific domains or environments directly on the Whatfix Analytics dashboard. This does not require any Advanced Customization (AC) code.

For example, you can block the capture of analytics data from the development environment of your application, which contains test data.

Whatfix enables you to add the URL properties of the domain on which you don't want to track analytics. Once the conditions are satisfied, Whatfix blocks the capture of analytics data for that specific domain.


Use case

For example, consider that you don't want to track analytics from the Salesforce sandbox environment (https://sandbox.salesforce.com) because it contains test data.

Add the following Exclude rule:

blocking_analytics_example.png

Once the rule evaluates to true, Whatfix blocks all analytics events originating from the Salesforce sandbox page.


Use the following steps to disable analytics on specific domains:

  1. On the Whatfix Analytics dashboard, click Settings.
    ia_pa_dashboard_settings

  2. Click Analytics.
    pa_settings_click_analytics.png

  1. Select the Block analytics data from specific environment checkbox.
    block_analytics_data

  2. Under the Exclude section, select the required URL property from the dropdown.
    url_conditions_block.png

Expand the accordion for more details.

How each URL condition blocks analytics data

URL propertyWhat it targetsHow it helps you block analytics
URLThe entire address, including protocol, hostname, path, query, and hash.Use the URL rule when your environment has a unique URL. Specifying the full URL (example, https://sandbox.salesforce.com/dashboard?isSandbox=true#lead) blocks analytics only for that exact page.
URL HostnameThe domain name between https:// and the first /.Use the URL Hostname rule to exclude entire environments (examples, sandbox.salesforce.com, dev.salesforce.com). The URL Hostname rule stops data collection across every page under the host.
URL PathEverything after the hostname and before any ? or #.Use the URL Path rule when your production and test environments share a host but differ by the folder structure. For example, blocking /test/ prevents analytics on URLs, such as https://mycompany.lightning.force.com/test/index.html.
URL ParametersQuery-string parameters that come after ?.Use the URL Parameter rule when a specific parameter marks test traffic, such as ?isSandbox=true. Excluding that parameter filters out only the unwanted sessions.
URL HashThe fragment that follows #.Common in Single-Page Applications (React, Lightning, and more). Blocking a particular hash, for example, #lead, stops analytics on pages where there are no page refreshes, but only hash changes.

For more information on the URL conditions, see URL Properties as Visibility Rules.

  1. Select the operator.
    operator_
Info:

For more information on the different operators, see Visibility and Display Rule Conditions.

  1. Enter the value.
    analytics_settings_block_analytics_data_add_url_hostname.png
Note:
  • Click the + icon to add more URL conditions. You can add multiple URL properties (example, URL Hostname and URL Hash) to target a page correctly.
    analytics_click_plus_in_block_analytics.png
  • If you've added any AC code to disable Analytics, Whatfix recommends that you remove the existing code and use the URL-based blocking.
  1. Click Done.
    click_done_in_pa_settings.png
Note:
  • If you disable Whatfix Analytics on specific domains, tracking of Goal Management is also disabled for the domains.
  • The change is applicable to both Guidance Analytics and Product Analytics.

Was this article helpful?


Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.