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

# Traffic permissions

> Use traffic permissions in Cometly to drop data-center traffic, exclude referrer domains and set rules for which page views a space counts.

The **Traffic permissions** page controls which traffic Cometly counts for the space you are in, and which domains count as a referrer. A space is one workspace in your account, with its own tracking data and settings. With traffic permissions in Cometly you choose which page views are kept before they reach your reports.

This matters because traffic you do not want skews your numbers. Open the page when bots inflate your page views, when your own domains show up as referrals, or when you need to drop a specific kind of traffic.

## Where to find it

Click **Settings** at the bottom of the left sidebar, then **Traffic permissions** under **Workspace**. The page is titled with the space name followed by **Traffic Permissions**, and every setting on it applies to that space only.

![Traffic permissions settings page with an arrow on Traffic permissions in the Workspace menu, showing the Drop data-center traffic switch turned off and the Exclude domain from referrer source card with no domains added.](https://mintcdn.com/cometly/tD3Mww01MPmE7a9V/images/settings/traffic-permissions/01.webp?fit=max\&auto=format\&n=tD3Mww01MPmE7a9V\&q=85\&s=5e39bb73e8c1be406913e13c56192ce0)

> [!NOTE]
>
> This is not where you add the domains your pixel runs on. Those are added in **Setup**, step 2. See [Install the pixel](https://docs.cometly.com/getting-started/install-pixel.md).

## Who can use it

The account **Owner** and members with the **Administrator** or **Advertiser** space role see **Traffic permissions** in the settings menu and can change everything on the page. Viewers do not see the menu item and cannot open the page.

## Drop data-center traffic

A switch that discards page views coming from cloud and hosting provider IP addresses before they are counted, for when bots inflate your page views. It also drops some real visitors, so read [Drop data-center traffic from your page views](https://docs.cometly.com/guides/tracking/drop-data-center-traffic.md) before you turn it on.

## Exclude domain from referrer source

A list of domains whose visits Cometly does not attribute to the referrer source, such as your own domains or partner sites. Click **Add Domain** to add one, and see [Exclude domains from the referrer source](https://docs.cometly.com/guides/tracking/exclude-referral-domains.md) for the details.

## Advanced traffic rules

This card, marked **advanced**, is a JSON editor. The card describes its contents as "Rules the tracker applies to this space's page views before they are stored, attributed or billed, on every visitor address." Leave the editor empty for no rules.

![Advanced traffic rules card with the empty JSON editor showing its placeholder, the Save rules and Clear rules buttons, and the Reference panel listing the rule keys.](https://mintcdn.com/cometly/tD3Mww01MPmE7a9V/images/settings/traffic-permissions/02.webp?fit=max\&auto=format\&n=tD3Mww01MPmE7a9V\&q=85\&s=2f22ad02ff1aa7bb877447a69da7fad6)

> [!WARNING]
>
> A page view that matches a rule is not stored, attributed or billed, and it cannot be recovered later. Real visitors who match a rule are dropped too. List only what you are prepared to lose.

We recommend you [contact support](https://docs.cometly.com/support/contact.md) before you save rules, because a rule drops every page view it matches, real visitors included.

### What a rule does

Rules are written as one JSON object. Each key is a rule, and its value is a list. A page view that matches any value in a list is dropped. The **Reference** panel next to the editor lists the rule keys you can use:

| Rule key | What it drops |
| - | - |
| `dropped_languages` | Page views whose browser language matches a listed tag. A bare primary subtag (`zh`) drops every region. A full tag (`zh-CN`) drops that region only. Tags are case-insensitive, and `_` and `-` are equivalent. |
| `dropped_platforms` | Page views from a listed operating system, as the visitor's browser reports it. Each value must be one of `windows`, `macos`, `ios`, `android`, `linux`, `chrome_os`, `firefox_os`. |

The **Reference** panel shows this sample of the format (it is also the editor's placeholder text). It is a format sample, not a recommendation:

```json theme={null}
{
  "dropped_languages": ["zh-CN", "zh"],
  "dropped_platforms": ["linux"]
}
```

### Limits

* Up to 20 tags per list, 35 characters each.
* Unknown keys are rejected.
* The text in the editor can be at most 5,000 characters.

### Save or clear rules

**1. Edit the JSON**

Type or paste your rules into the editor. The note **unsaved changes** appears next to the buttons.

**2. Save**

Click **Save rules**. You see **Traffic rules saved. The tracker applies them from the next page view.**

Cometly tidies what it stores: duplicates are removed, `_` in a language tag becomes `-`, platforms are saved in lower case, and a rule with an empty list is left out. The editor then shows the stored version.

**3. Clear the rules when you no longer need them**

Click **Clear rules**. All rules are removed at once, with no confirmation dialog, and you see **Traffic rules cleared.** Saving an empty editor or `{}` does the same.

Changes reach the tracker immediately. If you see **Rules saved, but the tracker could not be notified. They take effect within 12 hours.** instead, the rules are saved and start applying within 12 hours.

### Validation messages

If the text is not accepted, nothing is saved and a message appears in red under the editor.

![Advanced traffic rules card with a box around the editor, where the text test was rejected and the red message Not valid JSON: Syntax error. appears under it.](https://mintcdn.com/cometly/tD3Mww01MPmE7a9V/images/settings/traffic-permissions/03.webp?fit=max\&auto=format\&n=tD3Mww01MPmE7a9V\&q=85\&s=44deec343f15517c4d173eb42fc41746)

| Message | What to fix |
| - | - |
| `Not valid JSON: …` | The text is not valid JSON. Check quotes, commas and brackets. |
| `The rules must be a JSON object, for example {"dropped_languages": ["zh-CN"]}.` | The text is valid JSON but not an object. Wrap the rules in `{` and `}`. |
| `Unknown traffic rule(s): … Known: dropped_languages, dropped_platforms.` | A key is not one of the listed rule keys. |
| `dropped_languages must be a list of language tags such as ["zh-CN", "zh"].` | The value of `dropped_languages` is not a list. |
| `Every dropped language must be a non-empty string.` | A language entry is empty or is not text. |
| `Language tag "…" is longer than 35 characters.` | Shorten the tag. |
| `"…" is not a language tag (expected something like zh-CN or zh).` | The entry is not shaped like a language tag. |
| `At most 20 dropped languages per space.` | Remove languages until the list has 20 or fewer. |
| `dropped_platforms must be a list of platforms such as ["linux"]. Known: …` | The value of `dropped_platforms` is not a list. |
| `Every dropped platform must be a non-empty string.` | A platform entry is empty or is not text. |
| `"…" is not a platform the tracker knows. Known: …` | Use one of the operating systems listed above. |

## Frequently asked questions

### Do traffic permissions apply to all my spaces in Cometly?

No. Every setting on the page applies only to the space you are in. To use the same settings in another space, switch to that space and set them there.

### Do traffic rules remove page views that were already tracked?

No. Rules are applied to page views as they arrive, before they are stored, so a rule starts with the next page view after you save it. Page views recorded before that stay in your data.

### Are page views dropped by a traffic rule billed?

No. A page view that matches a rule is not stored, attributed or billed. It also cannot be recovered later, so list only traffic you are prepared to lose.

## Next steps

* [Drop data-center traffic from your page views](https://docs.cometly.com/guides/tracking/drop-data-center-traffic.md)
* [Exclude domains from the referrer source](https://docs.cometly.com/guides/tracking/exclude-referral-domains.md)
* [Install the pixel](https://docs.cometly.com/getting-started/install-pixel.md)
* [Space roles and permissions](https://docs.cometly.com/guides/account/space-roles.md)
* [Contact support](https://docs.cometly.com/support/contact.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.