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:
How each URL condition blocks analytics data
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, |
URL Hostname | The domain name between | Use the URL Hostname rule to exclude entire environments (examples, |
URL Path | Everything after the hostname and before any | Use the URL Path rule when your production and test environments share a host but differ by the folder structure. For example, blocking |
URL Parameters | Query-string parameters that come after | Use the URL Parameter rule when a specific parameter marks test traffic, such as |
URL Hash | The fragment that follows | Common in Single-Page Applications (React, Lightning, and more). Blocking a particular hash, for example, |
For more information on the URL conditions, see URL Properties as Visibility Rules.
Select the operator.

Info:
For more information on the different operators, see Visibility and Display Rule Conditions.
Enter the value.

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.
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.

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.
