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

# Suggest analytics events to track

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns short prompts that suggest analytics events worth tracking in the app.

An AI model writes them from the app's name, description, and recent AI chat messages, so each call can return different prompts. The call doesn't use the workspace's credits. You usually get four prompts, in English. If the model can't be reached you get a fixed set of general prompts instead, with a successful response.

To add the tracking, put `prefix` in front of a prompt and send it with [Send chat message](/api-reference/send-chat-message). Once the app sends events, read them with [List analytics event names](/api-reference/list-analytics-event-names).

This is limited to 30 requests a minute for each workspace's personal API keys, across all the workspace's apps, so every key in a workspace shares one allowance. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/analytics/suggestions
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/analytics/suggestions:
    get:
      summary: Suggest analytics events to track
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Returns short prompts that suggest analytics events worth tracking in
        the app.


        An AI model writes them from the app's name, description, and recent AI
        chat messages, so each call can return different prompts. The call
        doesn't use the workspace's credits. You usually get four prompts, in
        English. If the model can't be reached you get a fixed set of general
        prompts instead, with a successful response.


        To add the tracking, put `prefix` in front of a prompt and send it with
        [Send chat message](/api-reference/send-chat-message). Once the app
        sends events, read them with [List analytics event
        names](/api-reference/list-analytics-event-names).


        This is limited to 30 requests a minute for each workspace's personal
        API keys, across all the workspace's apps, so every key in a workspace
        shares one allowance. Some workspaces have a different limit.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app. A read-only key is refused, and workspace API
        keys are not accepted.</Note>
      operationId: get_event_suggestions_api_apps__app_id__analytics_suggestions_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose analytics to read.
            title: App Id
          description: ID of the app whose analytics to read.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: Suggested prompts for the app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuggestionsResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, or your API key is
            read-only or a workspace API key.
        '404':
          description: App not found.
        '429':
          description: Rate limit reached. Retry later.
components:
  schemas:
    SuggestionsResponse:
      properties:
        suggestions:
          items:
            type: string
          type: array
          title: Suggestions
          description: >-
            Short prompts, each describing events worth tracking in this app.
            They don't include `prefix`.
          example:
            - Track recipe saves and shares
            - Log meal plan creation
            - Record grocery list exports
            - Monitor search queries and result clicks
        prefix:
          type: string
          title: Prefix
          description: >-
            Text to put in front of each prompt before you send it to the app's
            AI chat.
          example: 'Using Event Tracking, '
      type: object
      required:
        - suggestions
        - prefix
      title: SuggestionsResponse
      description: Suggested prompts for adding analytics event tracking to an app.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````