> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# visitStartedEvent

GraphQL MUTATION

Mutation to record the start of a user visit in the analytics system.

Reference: https://docs.bigcommerce.com/developer/api-reference/graphql/storefront/mutations/analytics/visit-started-event

## GraphQL Schema

```graphql
mutation ExampleMutation($input: VisitStartedEventInput!) {
  analytics {
    visitStartedEvent(input: $input) {
      executed
    }
  }
}
```

## Variables

```json
{
  "input": {
    "commonInput": {
      "initiator": {
        "visitId": "example",
        "visitorId": "example"
      },
      "request": {
        "url": "example",
        "userAgent": "example",
        "refererUrl": "example",
        "ip": "example",
        "acceptLanguage": "example"
      },
      "consent": {
        "targeting": true,
        "analytics": true,
        "functional": true
      }
    }
  }
}
```