S2S 事件

    您可以通过 S2S 方式发送应用内事件和网页内事件。


    网页内事件发送

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/web/9320

    以 S2S 方式发送网页内事件。

    发送方法

    本方法适用于基于 Web SDK 的 Cookie ID 进行归因。[数据获取指南].

    2. 基于用户 ID(user.externalUserID)发送事件。

    本方法适用于基于用户 ID 进行归因。Airbridge 基于内部 ID 表中已与 user.externalUserID 匹配的 Client ID 进行归因。使用用户 ID 进行匹配时,则无需发送 Client ID,以下字段将成为选填参数。

    参数

    说明

    eventData.shortID

    归因广告系列参数 ID

    eventData.trackingData.channel

    归因广告系列渠道

    eventData.trackingData.params

    归因广告系列参数

    Request

    Headers

    Accept-Language
    string

    您可指定用于 API 请求和结果返回的语言。遵守 ISO-639-1 格式。

    Content-Type
    string

    表示资源的媒体类型。默认使用 application/json。

    Authorization
    string

    用于 API 请求的键值。

    X-Forwarded-For
    Requiredstring

    您可以在 X-Forwarded-For 请求头中发送用户 IP。如果没有 X-Forwarded-For,用户的活动中将记录请求 S2S API 的服务器 IP,而不是用户的 IP(客户端请求 IP)。

    接收 ipv4(123.123.123.123), ipv6(2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d) 格式的值。

    Path Params

    app_name
    Requiredstring

    Airbridge App 名称(App Name)

    Body Params

    eventUUID
    string

    事件唯一 ID。

    uuid4 格式的 event uuid 作为事件的唯一 ID 来用于去重。如果未提供,将由事件 API 自动生成。

    eventTimestamp
    number

    事件发生的时间。

    请发送单位为毫秒(Millisecond)的 Unix 时间戳(13 位数字)。

    如果 eventTimestamp 时间早于事件发送时间 24 小时,服务器将不会处理该事件。 请使用发送时间在 24 小时内的时间戳。

    user
    object

    您可提供用户信息。

    browser
    object

    您可提供浏览器信息。

    eventData
    object

    定义将发送至 Airbridge 的事件。

    Request
    123456
    curl -X POST 'https://api.airbridge.io/events/v1/apps/{app_name}/web/9320' \
      -H 'Accept-Language: ko' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
      -H 'X-Forwarded-For: 2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d' \
      -d '{"eventUUID":"9b4b3e4e-2162-4ae6-8986-91ee84644262","user":{"externalUserID":"19443","externalUserEmail":"example@ab180.co","externalUserPhone":"821012341234"},"browser":{"clientID":"05609013-bb5a-4594-bbc3-832cb1b87072","userAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E302"},"eventData":{"shortID":"aef04","trackingData":{"channel":"blog"},"goal":{"category":"add-to-cart","action":"shoes","label":"nike","semanticAttributes":{"query":"나이키","productListID":"list-id-1","cartID":"cart-id-1","transactionID":"12939172","inAppPurchased":true,"products":[{"position":"1","productID":"30372425","name":"나이키 커스텀","price":1000,"quantity":"1","currency":"KRW"}]}}}}'
    Payload
    12345678910111213141516171819202122232425262728293031323334353637383940
    {
      "eventUUID": "9b4b3e4e-2162-4ae6-8986-91ee84644262",
      "user": {
        "externalUserID": "19443",
        "externalUserEmail": "example@ab180.co",
        "externalUserPhone": "821012341234"
      },
      "browser": {
        "clientID": "05609013-bb5a-4594-bbc3-832cb1b87072",
        "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E302"
      },
      "eventData": {
        "shortID": "aef04",
        "trackingData": {
          "channel": "blog"
        },
        "goal": {
          "category": "add-to-cart",
          "action": "shoes",
          "label": "nike",
          "semanticAttributes": {
            "query": "나이키",
            "productListID": "list-id-1",
            "cartID": "cart-id-1",
            "transactionID": "12939172",
            "inAppPurchased": true,
            "products": [
              {
                "position": "1",
                "productID": "30372425",
                "name": "나이키 커스텀",
                "price": 1000,
                "quantity": "1",
                "currency": "KRW"
              }
            ]
          }
        }
      }
    }

    Response

    200SUCCESS

    Response
    1234
    {
      "at": "2020-02-06 16:06:49",
      "data": "Event(9320) is successfully proccessed."
    }

    应用内事件发送

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/mobile-app/9360

    以 S2S 方式发送应用内事件。

    发送方法

    1. 基于设备 ID(device.deviceUUID)发送事件。

    本方法适用于基于 SDK 的设备 ID 进行归因。 [数据获取指南]

    2. 基于用户 ID(user.externalUserID)发送事件。

    本方法适用于基于用户 ID 进行归因。Airbridge 基于内部 ID 表中已与 user.externalUserID 匹配的设备进行归因。使用用户 ID 进行匹配时,则无需发送设备 ID,如果没有与用户 ID 匹配的设备,则不处理该事件。

    Request

    Headers

    Accept-Language
    string

    您可指定用于 API 请求和结果返回的语言。遵守 ISO-639-1 格式。

    Content-Type
    string

    表示资源的媒体类型。默认使用 application/json。

    Authorization
    string

    用于 API 请求的键值。

    X-Forwarded-For
    Requiredstring

    您可以在 X-Forwarded-For 请求头中发送用户 IP。如果没有 X-Forwarded-For,用户的活动中将记录请求 S2S API 的服务器 IP,而不是用户的 IP(客户端请求 IP)。

    接收 ipv4(123.123.123.123), ipv6(2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d) 格式的值。

    Path Params

    app_name
    Requiredstring

    Airbridge App 名称(App Name)

    Body Params

    eventUUID
    string

    事件唯一 ID。

    uuid4 格式的 event uuid 作为事件的唯一 ID 来用于去重。如果未提供,将由事件 API 自动生成。

    eventTimestamp
    number

    事件发生的时间。

    请发送单位为毫秒(Millisecond)的 Unix 时间戳(13 位数字)。

    如果 eventTimestamp 时间早于事件发送时间 24 小时,服务器将不会处理该事件。 请使用发送时间在 24 小时内的时间戳。

    user
    object

    您可提供用户信息。

    device
    object

    您可提供设备信息。

    app
    Requiredobject

    用户的 App 信息。

    eventData
    object

    定义将发送至 Airbridge 的事件。

    Request
    123456
    curl -X POST 'https://api.airbridge.io/events/v1/apps/{app_name}/mobile-app/9360' \
      -H 'Accept-Language: ko' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
      -H 'X-Forwarded-For: 2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d' \
      -d '{"eventUUID":"9b4b3e4e-2162-4ae6-8986-91ee84644262","user":{"externalUserID":"19443","externalUserEmail":"example@ab180.co","externalUserPhone":"821012341234"},"device":{"deviceUUID":"2dfca632-86f3-4d22-9746-cdfe7985c471","gaid":"2dfca632-86f3-4d22-9746-cdfe7985c471","ifa":"542177F1-5C23-438B-8088-82D34C94F6D7","ifv":"37EEC3E0-BF15-412E-ADBA-7D2E82E7A75F","deviceModel":"LG-H542","deviceIdentifier":"iPhone11,2","manufacturer":"Samsung","osName":"Android","osVersion":"5.0.2","locale":"ko-KR","timezone":"Asia/Seoul","orientation":"portrait","screen":{"width":123},"location":{"latitude":120.103,"speed":"12"},"network":{"carrier":"SKTelecom","cellular":true,"wifi":true}},"app":{"packageName":"com.ab180.co","version":"1.2.3"},"eventData":{"goal":{"category":"add-to-cart","action":"shoes","label":"nike","semanticAttributes":{"productListID":"list-id-1","cartID":"cart-id-1","transactionID":"12939172","inAppPurchased":true,"products":[{"position":"1","productID":"30372425","name":"나이키 커스텀","price":1000,"quantity":"1","currency":"KRW"}]}}}}'
    Payload
    12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
    {
      "eventUUID": "9b4b3e4e-2162-4ae6-8986-91ee84644262",
      "user": {
        "externalUserID": "19443",
        "externalUserEmail": "example@ab180.co",
        "externalUserPhone": "821012341234"
      },
      "device": {
        "deviceUUID": "2dfca632-86f3-4d22-9746-cdfe7985c471",
        "gaid": "2dfca632-86f3-4d22-9746-cdfe7985c471",
        "ifa": "542177F1-5C23-438B-8088-82D34C94F6D7",
        "ifv": "37EEC3E0-BF15-412E-ADBA-7D2E82E7A75F",
        "deviceModel": "LG-H542",
        "deviceIdentifier": "iPhone11,2",
        "manufacturer": "Samsung",
        "osName": "Android",
        "osVersion": "5.0.2",
        "locale": "ko-KR",
        "timezone": "Asia/Seoul",
        "orientation": "portrait",
        "screen": {
          "width": 123
        },
        "location": {
          "latitude": 120.103,
          "speed": "12"
        },
        "network": {
          "carrier": "SKTelecom",
          "cellular": true,
          "wifi": true
        }
      },
      "app": {
        "packageName": "com.ab180.co",
        "version": "1.2.3"
      },
      "eventData": {
        "goal": {
          "category": "add-to-cart",
          "action": "shoes",
          "label": "nike",
          "semanticAttributes": {
            "productListID": "list-id-1",
            "cartID": "cart-id-1",
            "transactionID": "12939172",
            "inAppPurchased": true,
            "products": [
              {
                "position": "1",
                "productID": "30372425",
                "name": "나이키 커스텀",
                "price": 1000,
                "quantity": "1",
                "currency": "KRW"
              }
            ]
          }
        }
      }
    }

    Response

    200SUCCESS

    Response
    1234
    {
      "at": "2020-02-06 16:06:49",
      "data": "Event(9360) is successfully proccessed."
    }

    Was this page helpful?

    Have any questions or suggestions?