Code inclusion/exclusion conditions let you control exactly where and when an integration's code runs on your knowledge base site. Instead of running a script across your entire site, you can target or exclude specific IP addresses, workspaces, or languages. This is useful for filtering out internal traffic from analytics, restricting a widget to a specific workspace, or limiting data collection to certain languages.
You can configure these conditions when adding or editing any integration in Document360.
Condition types
You can set conditions based on three criteria:
- IP address: allow or restrict the script for specific IP addresses or IP ranges.
- Workspace: show or hide the script for specific workspaces.
- Language: show or hide the script for specific languages.
When you add more than one condition, you can apply logic to control how they combine:
- AND: all conditions must be true for the script to run.
- OR: any one condition being true is enough for the script to run.
How to configure conditions
IP address condition
Use IP address conditions to allow or restrict the integration script based on the user's IP address. This is useful for excluding internal team traffic from analytics data.
- On the Edit integration panel, in the Select Condition Type field, choose IP Address.
- From the Include or Exclude dropdown, select Show or Hide depending on whether you want to include or exclude matching IPs.
- In the IP type field, choose Exact to target a single IP address, or Range to target a block of addresses.
- In the IP address field, enter the IP address or range.
Example: To collect analytics data only from internal users, choose Exact and enter your office IP. To cover a range of internal addresses, choose Range and define the start and end of the IP range.
Workspace condition
Use workspace conditions to show or hide the integration script on specific workspaces in your knowledge base.
- On the Edit integration panel, in the Select Condition Type field, choose Workspace.
- From the Include or Exclude dropdown, select Show or Hide depending on whether you want the script to run on or be excluded from the selected workspaces.
- In the Select workspaces field, choose the workspaces to include or exclude. You can add multiple conditions for different workspaces as needed.
Language condition
Use language conditions to show or hide the integration script for specific languages on your knowledge base site.
- On the Edit integration panel, in the Select Condition Type field, choose Language.
- From the Include or Exclude dropdown, select Show or Hide depending on whether you want the script to run for or be excluded from the selected languages.
- In the Select languages field, choose the languages to include or exclude. You can add multiple conditions for different languages as needed.
Best practices
- Exclude internal IP addresses from analytics integrations. If your team regularly visits the knowledge base, add an IP exclusion condition to prevent internal traffic from skewing your analytics data.
- Use workspace conditions when you have product-specific knowledge bases. If different workspaces serve different audiences, you can limit a chat widget or tracking script to only the workspaces where it is relevant.
- Use language conditions for region-specific tools. If you use a tool that is only licensed or relevant for certain regions, use a language condition to limit where it runs.
- Use AND logic when you need to narrow scope precisely. For example, to track only internal users on a specific workspace, combine an IP condition and a workspace condition with AND logic.
- Use OR logic when you want broader coverage. If a script should run for users from either of two workspaces, combine them with OR logic so it runs when either condition is met.
FAQ
Can I add code inclusion/exclusion conditions to any integration?
Yes. Code inclusion/exclusion conditions are available for all integrations in Document360, including native integrations and Custom HTML entries. You can configure them when adding a new integration or when editing an existing one.
What is the difference between AND and OR logic?
AND logic means all conditions must be true at the same time for the script to run. OR logic means the script runs if any one of the conditions is true. Use AND to narrow scope precisely, and OR to broaden it.
Can I add multiple conditions of the same type?
Yes. You can add multiple workspace conditions, multiple language conditions, or multiple IP conditions to the same integration. Each condition can be configured independently.
Will disabling an integration also disable its conditions?
Yes. If you toggle an integration off, the script stops running entirely regardless of the conditions configured. The conditions are preserved and take effect again when the integration is re-enabled.
Do conditions apply to Custom HTML snippets as well?
Yes. Code inclusion/exclusion conditions work the same way for Custom HTML snippets as they do for native integrations. You can edit any Custom HTML entry and expand the conditions section to add IP, workspace, or language rules.