# getFormTrafficSources

Where a form's traffic and submissions come from - breakdowns by traffic source, device class, and location, each with views, submits, and the submit rate.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getFormTrafficSources", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: yes

## Variables

- `formId`: `ID!` (required)

## Response (data, an example)

```json
{
  "embedFormQuery": {
    "analyticsSourcesDevices": {
      "trafficSources": [
        {
          "trafficSource": "…",
          "views": 0,
          "submits": 0,
          "rate": 0
        }
      ],
      "deviceMix": [
        {
          "deviceClass": "…",
          "views": 0,
          "submits": 0,
          "rate": 0
        }
      ],
      "locationMix": [
        {
          "city": "…",
          "region": "…",
          "country": "…",
          "views": 0,
          "submits": 0,
          "rate": 0
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getFormTrafficSources",
    "variables": {
      "formId": "<formId>"
    }
  }'
```
