---
page_title: "cloudflare_web_analytics_site Resource - Cloudflare"
subcategory: ""
description: |-
Accepted Permissions
Account Settings ReadAccount Settings Write
---
# cloudflare_web_analytics_site (Resource)
Accepted Permissions
- `Account Settings Read`
- `Account Settings Write`
## Example Usage
```terraform
resource "cloudflare_web_analytics_site" "example_web_analytics_site" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
auto_install = true
host = "example.com"
zone_tag = "023e105f4ecef8ad9ca31a8372d0c353"
}
```
## Schema
### Required
- `account_id` (String) Identifier.
### Optional
- `auto_install` (Boolean) If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- `enabled` (Boolean) Enables or disables RUM. This option can be used only when auto_install is set to true.
- `host` (String) The hostname to use for gray-clouded sites.
- `lite` (Boolean) If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- `zone_tag` (String) The zone identifier.
### Read-Only
- `created` (String)
- `id` (String) The Web Analytics site identifier.
- `rules` (Attributes List) A list of rules. (see [below for nested schema](#nestedatt--rules))
- `ruleset` (Attributes) (see [below for nested schema](#nestedatt--ruleset))
- `site_tag` (String) The Web Analytics site identifier.
- `site_token` (String) The Web Analytics site token.
- `snippet` (String) Encoded JavaScript snippet.
### Nested Schema for `rules`
Read-Only:
- `created` (String)
- `host` (String) The hostname the rule will be applied to.
- `id` (String) The Web Analytics rule identifier.
- `inclusive` (Boolean) Whether the rule includes or excludes traffic from being measured.
- `is_paused` (Boolean) Whether the rule is paused or not.
- `paths` (List of String) The paths the rule will be applied to.
- `priority` (Number)
### Nested Schema for `ruleset`
Read-Only:
- `enabled` (Boolean) Whether the ruleset is enabled.
- `id` (String) The Web Analytics ruleset identifier.
- `zone_name` (String)
- `zone_tag` (String) The zone identifier.
## Import
Import is supported using the following syntax:
```shell
$ terraform import cloudflare_web_analytics_site.example '/'
```