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

# Get Steam UTM

> Steam store visits, wishlists, purchases, and activations by UTM parameters, from the imported Steam UTM Analytics CSV export. `group_by` picks the grouping: source, medium, campaign, content, term, or campaign_content. `view=breakdown` (default) returns the first 100 groups by wishlists; `view=daily` returns one row per day and group. Steam credits conversions only to visits by people logged in to Steam (tracked visits).



## OpenAPI

````yaml /api/openapi.json get /v0/projects/{projectId}/query/steam-utm
openapi: 3.1.0
info:
  title: Manalens API
  version: 0.1.0
  description: >-
    The public API of Manalens: event ingestion, Steam account links, player
    traits and the Query API. Success bodies are the resource, with no envelope.
    Errors use the `Error` format. See https://docs.manalens.dev/api/overview.
servers:
  - url: https://api.manalens.dev
    description: API
  - url: https://events.manalens.dev
    description: Event ingestion
security: []
tags:
  - name: Events
    description: Send website, game and server events
  - name: Accounts
    description: Link the Steam account of a player to the game install
  - name: Players
    description: Set and delete the traits of identified players
  - name: Query
    description: Read analytics reports with an API key
paths:
  /v0/projects/{projectId}/query/steam-utm:
    get:
      tags:
        - Query
      summary: Get Steam UTM
      description: >-
        Steam store visits, wishlists, purchases, and activations by UTM
        parameters, from the imported Steam UTM Analytics CSV export. `group_by`
        picks the grouping: source, medium, campaign, content, term, or
        campaign_content. `view=breakdown` (default) returns the first 100
        groups by wishlists; `view=daily` returns one row per day and group.
        Steam credits conversions only to visits by people logged in to Steam
        (tracked visits).
      operationId: getSteamUtm
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project ID
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/date_from'
        - $ref: '#/components/parameters/date_to'
        - name: app_id
          in: query
          required: false
          description: 'Steam app ID. Default: every app of the project'
          schema:
            type: string
            pattern: ^\d{1,10}$
        - name: group_by
          in: query
          required: false
          description: 'Default: source'
          schema:
            type: string
            enum:
              - source
              - medium
              - campaign
              - content
              - term
              - campaign_content
        - name: view
          in: query
          required: false
          description: 'Default: breakdown'
          schema:
            type: string
            enum:
              - breakdown
              - daily
        - $ref: '#/components/parameters/utm_source'
        - $ref: '#/components/parameters/utm_medium'
        - $ref: '#/components/parameters/utm_campaign'
        - $ref: '#/components/parameters/utm_content'
        - $ref: '#/components/parameters/utm_term'
      responses:
        '200':
          description: The report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SteamUtm'
        '400':
          description: >-
            `INVALID_QUERY`: a parameter or the body is not valid. The message
            names the problem.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `UNAUTHORIZED`: the API key is missing, malformed, unknown or
            revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            `SUBSCRIPTION_REQUIRED`: the workspace has no active subscription or
            trial. `PLAN_UPGRADE_REQUIRED`: API keys need the Studio plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `FORBIDDEN`: the key does not have the scope, its creator left the
            workspace, or the request came from a browser.
            `WORKSPACE_SUSPENDED`: the workspace is suspended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `NOT_FOUND`: the key belongs to another project, or the resource
            does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`TOO_MANY_REQUESTS`: the key or workspace budget is used up'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              description: Seconds to wait before a retry
              schema:
                type: integer
            RateLimit-Limit:
              description: The limit of the window, when it is known
              schema:
                type: integer
            RateLimit-Policy:
              description: '`<limit>;w=<window seconds>`, when the limit is known'
              schema:
                type: string
            RateLimit-Remaining:
              description: Always 0 on a 429
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (the same as Retry-After)
              schema:
                type: integer
        '500':
          description: '`INTERNAL`: an unexpected error. The body has a `request_id`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKey: []
components:
  parameters:
    date_from:
      name: date_from
      in: query
      required: false
      description: 'First day (UTC) as YYYY-MM-DD. Default: 29 days before date_to.'
      schema:
        type: string
        pattern: ^\d{4}-\d{2}-\d{2}$
    date_to:
      name: date_to
      in: query
      required: false
      description: >-
        Last day (UTC) as YYYY-MM-DD. Default: today. The range is at most 367
        days.
      schema:
        type: string
        pattern: ^\d{4}-\d{2}-\d{2}$
    utm_source:
      name: utm_source
      in: query
      required: false
      schema:
        type: string
        maxLength: 255
    utm_medium:
      name: utm_medium
      in: query
      required: false
      schema:
        type: string
        maxLength: 255
    utm_campaign:
      name: utm_campaign
      in: query
      required: false
      schema:
        type: string
        maxLength: 255
    utm_content:
      name: utm_content
      in: query
      required: false
      schema:
        type: string
        maxLength: 255
    utm_term:
      name: utm_term
      in: query
      required: false
      schema:
        type: string
        maxLength: 255
  schemas:
    SteamUtm:
      type: object
      properties:
        date_from:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: First day of the report
        date_to:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: Last day of the report
        app_id:
          description: The Steam app ID filter, when one was given
          type: number
        group_by:
          type: string
          enum:
            - source
            - medium
            - campaign
            - content
            - term
            - campaign_content
        view:
          type: string
          enum:
            - breakdown
            - daily
        totals:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type:
              - number
              - 'null'
          description: >-
            Range totals: total_visits, trusted_visits, tracked_visits,
            wishlists, purchases, activations, wishlist_rate, and purchase_rate
            (percents per tracked visit, null without tracked visits)
        rows:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        row_count:
          type: number
          description: Rows the report returned, before the cut
        truncated:
          type: boolean
          description: >-
            True when rows holds only the first 100 (breakdown) or 400 (daily)
            rows
        notes:
          type: array
          items:
            type: string
          description: Fixed sentences on how Steam counts these numbers
      required:
        - date_from
        - date_to
        - group_by
        - view
        - totals
        - rows
        - row_count
        - truncated
        - notes
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A stable, machine-readable code. Branch on it.
            message:
              type: string
              description: A human-readable text. The wording can change.
            request_id:
              description: 'INTERNAL only: quote it when you contact support'
              type: string
            issues:
              description: 'INVALID_EVENT only: up to five validation issues'
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                    description: Where the problem is, such as `events.0.properties`
                  message:
                    type: string
                    description: What is wrong, such as `at most 50 keys`
                required:
                  - path
                  - message
            refused:
              description: >-
                INVALID_EVENT when no event of the batch is accepted: each
                refused event (the same list as `errors`, kept for SDKs that
                read it here)
              type: array
              items:
                type: object
                properties:
                  index:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: The position of the event in the batch
                  message_id:
                    description: The message_id of the event, or null when it has none
                    type:
                      - string
                      - 'null'
                  code:
                    type: string
                    description: >-
                      The reason code, such as `INVALID_EVENT`,
                      `SESSION_ID_REQUIRED` or `FORBIDDEN`
                  message:
                    type: string
                    description: 'What is wrong, such as `properties: at most 50 keys`'
                required:
                  - index
                  - message_id
                  - code
                  - message
            results:
              description: 'INVALID_TRAITS of a batch trait update: the result of each item'
              type: array
              items:
                type: object
                properties:
                  index:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  user_id:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - index
            feature:
              description: >-
                PLAN_UPGRADE_REQUIRED only: the plan feature that the request
                needs
              type: string
            billing_url:
              description: 'PLAN_UPGRADE_REQUIRED only: the billing page of the workspace'
              type: string
          required:
            - code
            - message
      required:
        - error
      description: >-
        The error format of every endpoint. See
        https://docs.manalens.dev/api/errors.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key (`mana_api_...`) with scopes. It reads reports and writes
        player traits.

````

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