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

# Replace the workspace's web analytics settings

> Gated by the web_analytics write permission (like blog settings, members manage the feature without workspace write access). The attribution filters version is recomputed server-side. Passing null settings clears the configuration.

Writing an identified visitor's goals and navigation to their contact timeline is not configured here and has no setting: calling identify() with an HMAC is the opt-in, because minting that credential requires the workspace secret.




## OpenAPI

````yaml /openapi.json post /api/workspaces.setWebAnalyticsSettings
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/workspaces.setWebAnalyticsSettings:
    post:
      tags:
        - Web Analytics
      summary: Replace the workspace's web analytics settings
      description: >
        Gated by the web_analytics write permission (like blog settings, members
        manage the feature without workspace write access). The attribution
        filters version is recomputed server-side. Passing null settings clears
        the configuration.


        Writing an identified visitor's goals and navigation to their contact
        timeline is not configured here and has no setting: calling identify()
        with an HMAC is the opt-in, because minting that credential requires the
        workspace secret.
      operationId: setWebAnalyticsSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
              properties:
                workspace_id:
                  type: string
                settings:
                  $ref: '#/components/schemas/WebAnalyticsSettings'
      responses:
        '200':
          description: Settings updated
        '400':
          description: Validation failed
        '403':
          description: >-
            The caller lacks web_analytics write, returned with the missing
            resource named in the error message.
      security:
        - BearerAuth: []
components:
  schemas:
    WebAnalyticsSettings:
      type: object
      nullable: true
      properties:
        enabled:
          type: boolean
        allowed_domains:
          type: array
          items:
            type: string
          description: >-
            Origins allowed to send beats ("example.com", "*.example.com");
            empty allows all.
        bounce_threshold_seconds:
          type: integer
          description: Sessions with less engaged time count as bounces (default 10).
        filters:
          type: array
          items:
            $ref: '#/components/schemas/WebFilter'
        filters_version:
          type: string
          readOnly: true
        custom_dimension_labels:
          type: object
          additionalProperties:
            type: string
        identify_from_email_links:
          type: boolean
          description: >-
            Adds a signed identity to the links of tracked emails, so a
            recipient who clicks one is recognised on landing without any code
            on the customer's site, and their visit is tied to their contact
            record. Off by default: unlike identify(), which the customer's own
            server calls with their own secret, this credential is minted by
            Notifuse for every recipient of every tracked send, so it is theirs
            to ask for.
        geo_enabled:
          type: boolean
        geo_store_city:
          type: boolean
        geo_store_region:
          type: boolean
        geo_coordinates_precision:
          type: integer
          minimum: 0
          maximum: 2
    WebFilter:
      type: object
      required:
        - id
        - name
        - priority
        - conditions
        - operations
        - enabled
      properties:
        id:
          type: string
        name:
          type: string
        priority:
          type: integer
          minimum: 0
          maximum: 1000
        order:
          type: integer
        tags:
          type: array
          items:
            type: string
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/WebFilterCondition'
        operations:
          type: array
          items:
            $ref: '#/components/schemas/WebFilterOperation'
        enabled:
          type: boolean
        version:
          type: string
    WebFilterCondition:
      type: object
      required:
        - field
        - operator
      properties:
        field:
          type: string
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - contains
            - not_contains
            - is_empty
            - is_not_empty
            - regex
        value:
          type: string
    WebFilterOperation:
      type: object
      required:
        - dimension
        - action
      properties:
        dimension:
          type: string
        action:
          type: string
          enum:
            - set_value
            - unset_value
            - set_default_value
        value:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````