- 25 Sep 2025
- 2 Minutes To Read
- Print
- DarkLight
- PDF
How to disable Product Analytics on specific domains?
- Updated On 25 Sep 2025
- 2 Minutes To Read
- Print
- DarkLight
- PDF
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:
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:
On the Whatfix Analytics dashboard, click Settings.
Click Analytics.
Select the Block analytics data from specific environment checkbox.
Under the Exclude section, select the required URL property from the dropdown.
Expand the accordion for more details.
URL property | What it targets | How it helps you block analytics |
---|---|---|
URL | The 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 Hostname | The 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 Path | Everything 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 Parameters | Query-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 Hash | The 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.
- Select the operator.
For more information on the different operators, see Visibility and Display Rule Conditions.
- Enter the value.
- 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.
- If you've added any AC code to disable Analytics, Whatfix recommends that you remove the existing code and use the URL-based blocking.
- Click Done.
- 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.