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

# Get link variant analytics

> Requires link.read. Returns active variants and their traffic, conversions and revenue for the supplied date interval. conversionRate is conversions divided by visitors (0 when there are no visitors). Both date strings must be nonempty; this legacy endpoint does not validate their format.



## OpenAPI

````yaml https://api.trackup.me/openapi.json get /v1/projects/{id}/links/{linkId}/analytics
openapi: 3.1.0
info:
  title: Trackup API
  description: >-
    API-key-accessible Trackup operations. Send your key in the `X-Api-Key`
    header.


    Keys belong to a team. `X-Team-Id` is not required; if supplied, it must
    match that team.


    Each operation lists its required key permission. The key creator must
    remain a team member and normally hold that permission. The ingest-only
    permissions `visitor.create`, `conversion.create`, and `request.create` do
    not need to be held by the creator.


    Project access and selection are described per operation. Session-only
    account, administration and OAuth operations are not part of this reference.


    The same operations are available as MCP tools at `/mcp` (Streamable HTTP).
    Authenticate with `X-Api-Key` or connect through OAuth, which issues an API
    key on consent.


    Schema validation errors return HTTP 422 with an `errors` object. Other
    errors generally contain `error` and `message`; operation-specific responses
    describe exceptions.
  version: 1.0.0
servers:
  - url: /
    description: Current API environment
security:
  - ApiKey: []
paths:
  /v1/projects/{id}/links/{linkId}/analytics:
    get:
      tags:
        - Links
      summary: Get link variant analytics
      description: >-
        Requires link.read. Returns active variants and their traffic,
        conversions and revenue for the supplied date interval. conversionRate
        is conversions divided by visitors (0 when there are no visitors). Both
        date strings must be nonempty; this legacy endpoint does not validate
        their format.
      operationId: getLinkAnalytics
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: linkId
          schema:
            type: string
            format: uuid
          required: true
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            minLength: 1
          description: Start of the analytics interval.
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            minLength: 1
          description: End of the analytics interval.
      responses:
        '200':
          description: Active variant analytics and totals.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkAnalytics'
        '400':
          description: Missing startDate/endDate, or a malformed request.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ApiError'
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
        '401':
          description: The X-Api-Key header is missing or the API key is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            The key is expired, revoked, lacks permission, or its creator no
            longer has the required team access. A conflicting X-Team-Id is also
            rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            The requested resource was not found or is outside the permitted
            scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            Invalid input. Each field path maps to its first validation message;
            _form identifies an object-level error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    LinkAnalytics:
      type: object
      properties:
        variants:
          type: array
          items:
            type: object
            properties:
              requests:
                type: number
              visitors:
                type: number
              conversions:
                type: number
              revenue:
                type: number
              urlId:
                type: string
                format: uuid
              pageId:
                type: string
                format: uuid
              salesPlatformId:
                type:
                  - string
                  - 'null'
                format: uuid
              salesPlatformName:
                type: string
              name:
                type: string
              pageName:
                type: string
              weight:
                type: number
              conversionRate:
                type: number
            required:
              - requests
              - visitors
              - conversions
              - revenue
              - urlId
              - pageId
              - salesPlatformId
              - salesPlatformName
              - name
              - pageName
              - weight
              - conversionRate
        totals:
          type: object
          properties:
            requests:
              type: number
            visitors:
              type: number
            conversions:
              type: number
            revenue:
              type: number
          required:
            - requests
            - visitors
            - conversions
            - revenue
      required:
        - variants
        - totals
      example:
        variants:
          - requests: 120
            visitors: 100
            conversions: 8
            revenue: 399.2
            urlId: 55555555-5555-4555-8555-555555555555
            pageId: 33333333-3333-4333-8333-333333333333
            salesPlatformId: null
            salesPlatformName: ''
            name: Landing A
            pageName: Autumn offer
            weight: 50
            conversionRate: 0.08
        totals:
          requests: 120
          visitors: 100
          conversions: 8
          revenue: 399.2
    ApiError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: true
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: string
      required:
        - errors
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key

````

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