> ## Documentation Index
> Fetch the complete documentation index at: https://www.help.creatora.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When building or modifying an integration with the Creatora API, start with https://www.help.creatora.io/en/api/build-with-ai.md. Retrieve the current GraphQL SDL from https://api.creatora.io/sdl before relying on API schema information.

# Get traffic sources

> Compare referral domains and UTM sources, channels and campaigns.

Find which websites and tagged links bring traffic to your Platform. Read referral domains alongside the UTM source, medium and campaign recorded in shared links.

The example covers **September 1, 2026 at 00:00 UTC** (`1788220800000`) through **October 1, 2026 at 00:00 UTC**, exclusive (`1790812800000`). Replace the timestamps for your period. Web Analytics date bounds are strict, so the query starts one millisecond earlier to include the first instant.

## Request

<RequestExample>
  ```graphql theme={null}
  {
    analytics { webAnalytics {
      referrerSources(startMillis: 1788220799999, endMillis: 1790812800000) {
        referrerSources { source count }
        utmSource { source count }
        utmMedium { source count }
        utmCampaign { source count }
      }
    } }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Illustrative response theme={null}
  {
    "data": {
      "analytics": {
        "webAnalytics": {
          "referrerSources": {
            "referrerSources": [
              {
                "source": "google.com",
                "count": 360
              },
              {
                "source": "direct",
                "count": 240
              },
              {
                "source": "linkedin.com",
                "count": 120
              }
            ],
            "utmSource": [
              {
                "source": "newsletter",
                "count": 150
              },
              {
                "source": "linkedin",
                "count": 90
              }
            ],
            "utmMedium": [
              {
                "source": "email",
                "count": 150
              },
              {
                "source": "social",
                "count": 90
              }
            ],
            "utmCampaign": [
              {
                "source": "drawing-launch",
                "count": 200
              },
              {
                "source": "september-news",
                "count": 40
              }
            ]
          }
        }
      }
    }
  }
  ```
</ResponseExample>

## Use the result

```javascript theme={null}
const sources = response.data.analytics.webAnalytics.referrerSources;
const report = {
  referrers: sources.referrerSources.map(item => ({
    source: item.source === "direct" ? "Direct / no referrer" : item.source,
    sessions: item.count
  })),
  utmSources: sources.utmSource,
  channels: sources.utmMedium,
  campaigns: sources.utmCampaign
};
```

Each list contains up to **20 groups**, ordered by count. Referrer counts describe recorded sessions; each UTM list counts sessions where that individual tag was captured. Missing referrers appear as `direct`. A literal UTM value of `direct` remains that tag’s value.

The four lists are separate breakdowns. They do not join a source to a medium, campaign, registration or purchase. Their totals can differ, and summing returned rows can omit groups beyond the top 20.

For example, share a link such as `https://academy.example.com/courses/drawing?utm_source=newsletter&utm_medium=email&utm_campaign=drawing-launch`. Creatora stores the first non-empty value received for each tag within a session. Use consistent names when comparing your links.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.