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

# Record User Log

> Records user interaction events.

The log field corresponding to the `type` must be included.

Supported event types:
- View events (vimp): Records when an advertisement is displayed to a user
- Impression events (imp): Accepted by downstream processing
- Clicks (clk): Records click events
- Conversions (conv): Records events when users complete desired actions after viewing or clicking

The request is accepted for downstream DMP processing. Processing and persistence occur downstream and are not specified here.



## OpenAPI

````yaml /openapi/decision.api.en-dev.json post /dmp/v0/log
openapi: 3.1.0
info:
  contact:
    email: a2support@aiderx.io
    name: A2 Support
    url: https://aiderx.io
  description: >+

    ### Introduction

    The Decision API is responsible for selecting and distributing ads or
    content based on user requests or contextual information, all in real time.

    Its rapid response and dynamic capabilities enable the **optimal** ad or
    recommendation to be served, ensuring users receive the highest possible
    value.


    A variety of algorithms, machine learning models, and rule-based logic can
    be applied, allowing the system to **adapt flexibly** to constantly changing
    conditions.

  title: Decision APIs
  version: dev
  x-logo:
    altText: A2 Logo
    url: >-
      https://cdn.prod.website-files.com/668de9e1f25ab5675d87758d/6690cf1bdce95af5e3522c25_a2_logo_800_250.png
servers: []
security: []
tags:
  - description: >

      Ad Serving APIs for requesting ads and configuring cache settings and
      other parameters of the ad serving modules.
    name: Ad Serving
  - description: |

      Recommendation Serving APIs for requesting recommendations.
    name: Recommendation Serving
  - description: >-

      APIs for manipulating caches of the serving server.


      ### **Important**

      If you directly manipulate the cached data related to advertising or
      recommendations on the Serving server,

      we **strongly advise** against also modifying the advertising or
      recommendation data through the Ad Manager.


      Alternatively, we **recommend** handling any advertising or recommendation
      data modifications via the Ad Manager APIs.

      Any changes made on the Serving server will **not** be reflected in the Ad
      Manager,

      which can compromise **data integrity**.
    name: Cache Management
  - description: |-

      APIs for manipulating configurations of the serving server
    name: Configuration
  - description: >

      APIs for receiving conversion, impression, and click logs related to ads
      or recommendations.
    name: Ad Log
paths:
  /dmp/v0/log:
    post:
      tags:
        - Ad Log
      summary: Record User Log
      description: >-
        Records user interaction events.


        The log field corresponding to the `type` must be included.


        Supported event types:

        - View events (vimp): Records when an advertisement is displayed to a
        user

        - Impression events (imp): Accepted by downstream processing

        - Clicks (clk): Records click events

        - Conversions (conv): Records events when users complete desired actions
        after viewing or clicking


        The request is accepted for downstream DMP processing. Processing and
        persistence occur downstream and are not specified here.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogType'
        required: true
      responses:
        '200':
          description: Accepted for downstream processing.
      security:
        - '': []
components:
  schemas:
    LogType:
      anyOf:
        - $ref: '#/components/schemas/AdLog'
    AdLog:
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          description: 'Event type - One of: `clk`, `vimp`, `imp`, `conv`'
        ad_log:
          description: >-
            Ad tracking identifier from Decision API responses (ext.ad_log
            field)
          examples:
            - >-
              YTU2ZDY2ZjctNDM4ZS00OTVjLWJiYTAtMjI4Mzk2MjQ0ZWVkfDA2NDI4NjYwLWY2NDMtNGVmNS05MzgzLTZjZmE1OGYxOGI2OXxjNTZkYzNiZi05MzVkLTRlZTYtYjFlZC1mMzFiZmMwMmJlOTF8NGJlMmQ4ZTYtYThhMS00NzI2LWEzMjAtNjkyNTYzMDkwZTQyfDllZjY2ZGM4LTBlMmMtNDlmMS05NDU3LWFmYmUwZGQ2ZjU3M3w1NTgxNmIzOTcxMWY5YjVhY2YzYjkwZTMxM2VkMjllNTE2NjU2MjNm
          type:
            - string
            - 'null'
        custom_targeting:
          additionalProperties: true
          description: >-
            Optional custom targeting attributes forwarded to downstream ad-log
            processing
          type:
            - object
            - 'null'
        price:
          description: >-
            Monetary value of the conversion (optional). Include only when an
            accurate value is available.
          format: double
          type:
            - number
            - 'null'
        reco_log:
          description: >-
            Optional recommendation log identifier for downstream recommendation
            logging
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/AdLogType'
      required:
        - type
        - action
      type: object
    ActionType:
      oneOf:
        - const: clk
          description: Click event - Records when a user clicks on an advertisement
          type: string
        - const: vimp
          description: View event - Records when an advertisement is displayed to a user
          type: string
        - const: imp
          description: Impression event accepted by downstream processing
          type: string
        - const: conv
          description: >-
            Conversion event - Records when a user performs a valuable action
            after viewing an ad. Conversions can be defined based on your
            business goals.


            Example conversion activities include:


            * Product purchase

            * Cart addition

            * Application installation

            * Service subscription

            * File download

            * Link click

            * Timed content consumption


            You can define any meaningful user action as a conversion based on
            your advertising objectives.
          type: string
    AdLogType:
      enum:
        - ad_log
        - reco_log
      type: string

````