---
title: "Code inclusion and exclusion conditions"
slug: "advanced-insertion-rules-in-integration"
description: "Learn how to set advanced insertion rules for integrated apps in Document360. Customize data collection by IP address, project, and language."
tags: ["Advanced Insertion Rules", "Premium"]
updated: 2025-12-17T06:07:23Z
published: 2026-01-31T09:30:11Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Code inclusion and exclusion conditions

After completing an integration setup in Document360, you can configure specific **Code inclusion/exclusion conditions** to manage where and how the integrated application’s code runs. This is useful for targeting specific cases or users.

For example, when integrating **Google Analytics**, you can set conditions to extract data based on:

- **IP Address** – Limit analytics to a specific IP or IP range.
- **Workspace** – Show analytics based on a selected workspace.
- **Language** – Collect data for specific languages on your site.

You can apply **AND/OR** logic to refine conditions when:

- Multiple conditions are added.
- All conditions should be true.
- Any one condition can be true.

![Integration setup for Google Analytics with options for code inclusion and condition types.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Google%20analytics%20integration%20setting%20up.png)

### IP address condition

Define conditions based on user IP addresses to allow or restrict data collection from specific locations.

1. On the **Upgrade Integration** panel, in the **Select Condition Type** field, choose **IP Address**.
2. From the **Include or Exclude** dropdown, select *Show*or *Hide* based on your needs.
3. In the **IP type** field, choose *Exact*or *Range* to specify a single IP or multiple IP addresses.
4. In the **IP address** field, specify the individual IP addresses or a range.

**Example**: To collect data only from internal users, choose **Exact** in the IP type field to monitor only a specified IP. For a range, set the operator to **Range** and define the IP range you need, allowing data collection across multiple addresses.

### Workspace condition

Set conditions for specific workspaces to control where analytics data is shown or hidden.

1. In the **Select Condition Type** field, choose **Workspace** in the Upgrade Integration panel.
2. From the **Include or Exclude** dropdown, select *Show*or *Hide* based on your needs.
3. In the **Select workspaces** field, specify which workspaces to include or exclude. You can add multiple conditions for different workspaces as needed.

### Language condition

Configure language-based conditions to show or hide data collection for selected languages.

1. In the **Select Condition Type** field, choose **Language** in the Upgrade Integration panel.
2. From the **Include or Exclude** dropdown, select *Show*or *Hide* based on your needs.
3. In the **Select languages** field, specify the language(s) to include or exclude in the integration. You can add multiple conditions for different languages as needed.

![](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/image-1765951124110.png)
