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

# Create Tracking Event

> Creates a new tracking event associated with a campaign creator



## OpenAPI

````yaml POST /tracking_events
openapi: 3.0.1
info:
  title: Growi API
  description: >-
    API documentation for Growi platform, showcasing the public tracking event
    endpoint
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /tracking_events:
    post:
      description: Creates a new tracking event associated with a campaign creator
      requestBody:
        description: Tracking event to be added
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTrackingEvent'
        required: true
      responses:
        '201':
          description: Tracking event created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: Campaign Affiliate does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewTrackingEvent:
      type: object
      required:
        - event_name
      properties:
        event_name:
          type: string
          enum:
            - cart_viewed
            - checkout_address_info_submitted
            - checkout_completed
            - checkout_contact_info_submitted
            - checkout_shipping_info_submitted
            - checkout_started
            - collection_viewed
            - page_viewed
            - payment_info_submitted
            - product_added_to_cart
            - product_removed_from_cart
            - product_viewed
            - search_submitted
            - payment_completed
            - app_installed
            - app_uninstalled
          description: Name of the event
        occurred_at:
          type: string
          format: date-time
          description: Timestamp of when the event occurred
        visitor_uid:
          type: string
          description: Unique identifier for the visitor
        event_data:
          type: object
          description: Additional data related to the event
        subtotal:
          type: integer
          description: >-
            Subtotal amount of the transaction in cents. For example, for $40,
            input 4000.
          nullable: true
        currency:
          type: string
          enum:
            - usd
            - eur
            - gbp
          description: Currency of the transaction
          nullable: true
        conversion_platform:
          type: string
          enum:
            - shopify
            - tik_tok_shop
            - ios
            - stripe
            - whop
          description: Which platform the conversion happened on
          nullable: false
        order_id:
          type: string
          description: ID of the order
          nullable: true
        order_type:
          type: string
          enum:
            - one_time
            - subscription
          description: Type of the order
          nullable: true
        payment_id:
          type: string
          description: ID of the payment
          nullable: true
        external_user_id:
          type: string
          description: External user ID associated with the event
          nullable: true
        quantity:
          type: integer
          description: Quantity involved in the event
        campaign_affiliate_id:
          type: string
          description: >-
            Tag of the campaign affiliate associated with the event. Not
            required when `order_id` is present and the order is a recurring
            subscription.
        subscription_start_date:
          type: integer
          description: >-
            UTC integer timestamp for the start of the subscription. Required
            only for subscription events.
        subscription_end_date:
          type: integer
          description: >-
            UTC integer timestamp for the end of the subscription. Required only
            for subscription events.
        product_id:
          type: string
          description: >-
            The product or plan ID associated with the purchase. Required only
            for payment events.
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````