# Get Website Split Test Statistics

Reads the results of a website split test for one conversion goal: per variant the visitors, conversions, conversion rate, revenue and revenue per visitor, the leading variant and how sure that lead is.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "ID of the split test, from search-website-split-tests",
      "minimum": 1
    },
    "goal": {
      "type": "integer",
      "description": "Number of the conversion goal to count, 1 to 5 in the order of the test's targets; omit for the first",
      "default": 1,
      "minimum": 1,
      "maximum": 5
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "id",
    "goal",
    "goalName",
    "isPriceTest",
    "totalVisitors",
    "totalConversions",
    "unassignedConversions",
    "confidenceLevel",
    "terminatedOn",
    "variants"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "id": {
      "type": "integer"
    },
    "goal": {
      "type": "integer"
    },
    "goalName": {
      "type": "string"
    },
    "isPriceTest": {
      "type": "boolean"
    },
    "totalVisitors": {
      "type": "integer"
    },
    "totalConversions": {
      "type": "integer"
    },
    "unassignedConversions": {
      "type": "integer"
    },
    "confidenceLevel": {
      "type": "integer"
    },
    "terminatedOn": {
      "type": "string"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "variant",
          "description",
          "weight",
          "visitors",
          "conversions",
          "conversionRate",
          "isControl",
          "isLeading",
          "revenuePerConversion",
          "revenue",
          "earningsPerVisitor"
        ],
        "properties": {
          "variant": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "weight": {
            "type": "integer"
          },
          "visitors": {
            "type": "integer"
          },
          "conversions": {
            "type": "integer"
          },
          "conversionRate": {
            "type": "number"
          },
          "isControl": {
            "type": "boolean"
          },
          "isLeading": {
            "type": "boolean"
          },
          "revenuePerConversion": {
            "type": "number"
          },
          "revenue": {
            "type": "number"
          },
          "earningsPerVisitor": {
            "type": "number"
          }
        }
      }
    }
  }
}
```

