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

# Analytics (Google Analytics 4)

> Pull your website visitor data from Google Analytics 4 — users, pageviews, channels, pages, and devices.

Get your website analytics from **Google Analytics 4**. These endpoints power the Traffic dashboard's **Analytics** tab when GA4 is your connected provider — users, pageviews, sessions, traffic sources, top pages, and device breakdowns.

<Note>
  You need a **Google Analytics 4** integration connected to your team. Connect it from **Settings → Integrations → Analytics & Performance**. Using **PostHog** instead? See [Analytics (PostHog)](/docs/api-reference/endpoints/posthog-traffic). Using **Plausible**? See [Analytics (Plausible)](/docs/api-reference/endpoints/plausible-traffic).
</Note>

### Filters Parameter

The `filters` query parameter accepts URL-encoded JSON with dimensions and their selected values:

```
filters=[{"dimension":"channel","values":["Organic Search","Direct"]}]
```

Available dimensions: `channel`, `referrer`, `campaign`, `deviceCategory`, `browser`, `os`, `page`. Call `GET /integrations/ga/filter-values` for the available dimension values.

***

## Filter Values

`GET /integrations/ga/filter-values`

Get the available values for a given filter dimension (used to populate filter dropdowns). Pass `dimension` as a query parameter — one of `channel`, `referrer`, `campaign`, `deviceCategory`, `browser`, `os`, `page`.

***

## Totals Overview

`GET /integrations/ga/traffic/overview`

Get total users, pageviews, and sessions with period-over-period comparison.

***

## Traffic Chart

`GET /integrations/ga/chart/overview`

Get daily users, pageviews, sessions, and bounce rate for the selected date range — used to power the main trend chart.

***

## Traffic Channels

`GET /integrations/ga/channels`

Get your traffic broken down by source type.

Channels returned: `Direct`, `Organic Search`, `Paid Search`, `Organic Social`, `Paid Social`, `Email`, `Referral`, `Display`, `Organic Video`, `Affiliates`, `Unassigned`.

***

## Traffic Sources (Referrers)

`GET /integrations/ga/sources/overview`

Get your traffic sources — external referrers and their sessions.

***

## Campaigns

`GET /integrations/ga/campaigns/overview`

Get performance for your UTM-tagged marketing campaigns.

***

## Top Pages

`GET /integrations/ga/pages/overview`

Get your most-viewed pages with engagement metrics.

***

## Traffic by Country

`GET /integrations/ga/countries/overview`

See where your visitors are located geographically.

***

## Traffic by Device

`GET /integrations/ga/devices/overview`

See the device categories your visitors use.

***

## Traffic by Browser

`GET /integrations/ga/devices/browsers`

Break your visitors down by browser.

***

## Traffic by Operating System

`GET /integrations/ga/devices/os`

Break your visitors down by operating system.

***

## New vs Returning Visitors

`GET /integrations/ga/user-type`

See the split between new and returning visitors.

***

## Engagement

`GET /integrations/ga/behavior/engagement`

Get engagement rate with period-over-period comparison.

***

## Average Session Duration

`GET /integrations/ga/avg-duration`

Get the average session duration with period-over-period comparison.


## OpenAPI

````yaml GET /v3/integrations/ga/chart/overview
openapi: 3.0.0
info:
  title: SnowSEO API
  description: API documentation for SnowSEO
  version: 1.0.0
servers:
  - url: https://api.snowseo.com
    description: Production server
security: []
tags:
  - name: Keywords
    description: Keyword research and suggestion end-points
  - name: Onboarding
    description: Brand onboarding and strategy end-points
  - name: Brands
    description: Brand management end-points
  - name: Organizations
    description: Organization and member end-points
  - name: Integrations
    description: Google Search Console and other integrations
  - name: Utilities
    description: Common utility end-points like screenshots and uploads
externalDocs:
  url: https://snowseo.com/docs
  description: Find more info here
paths:
  /v3/integrations/ga/chart/overview:
    get:
      tags:
        - Google Analytics
      summary: Get GA chart data
      description: >-
        Returns Google Analytics chart data (sessions, users, pageviews) per day
        with previous-period comparison.
      operationId: getGaChart
      parameters:
        - schema:
            type: string
          in: query
          name: teamId
          required: false
          description: Team ID
        - schema:
            type: integer
          in: query
          name: days
          required: false
          description: Number of days to look back
        - schema:
            type: string
          in: query
          name: startDate
          required: false
          description: Start date (YYYY-MM-DD)
        - schema:
            type: string
          in: query
          name: endDate
          required: false
          description: End date (YYYY-MM-DD)
        - schema:
            type: string
          in: query
          name: country
          required: false
          description: Country filter
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          in: query
          name: filters
          required: false
          description: Additional dimension filters
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - chartData
                properties:
                  chartData:
                    type: array
                    items:
                      type: object
                      required:
                        - date
                        - sessions
                        - users
                        - pageviews
                      properties:
                        date:
                          type: string
                        sessions:
                          type: number
                        users:
                          type: number
                        pageviews:
                          type: number
                        prevSessions:
                          type: number
                          nullable: true
                        prevUsers:
                          type: number
                          nullable: true
                        prevPageviews:
                          type: number
                          nullable: true
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string

````