メインコンテンツへスキップ
POST
/
event
イベント送信
curl --request POST \
  --url https://api-v2.adrop.io/event \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "uid": "<string>",
  "eventName": "<string>",
  "platform": "<string>"
}
'
import requests

url = "https://api-v2.adrop.io/event"

payload = {
"uid": "<string>",
"eventName": "<string>",
"platform": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({uid: '<string>', eventName: '<string>', platform: '<string>'})
};

fetch('https://api-v2.adrop.io/event', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.adrop.io/event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uid' => '<string>',
'eventName' => '<string>',
'platform' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-v2.adrop.io/event"

payload := strings.NewReader("{\n \"uid\": \"<string>\",\n \"eventName\": \"<string>\",\n \"platform\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-v2.adrop.io/event")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"uid\": \"<string>\",\n \"eventName\": \"<string>\",\n \"platform\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-v2.adrop.io/event")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"uid\": \"<string>\",\n \"eventName\": \"<string>\",\n \"platform\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
    "message": "ok"
}
{
    "message": "!invalid"
}
ユーザー行動イベントを送信して、イベントベースのオーディエンスターゲティングを構築できます。イベントデータはオーディエンスセグメンテーションおよびコンバージョントラッキングに活用されます。

リクエストパラメータ

ヘッダー

Authorization
string
必須
App Key(adrop_service.jsonで確認)
Content-Type
string
必須
application/json

ボディパラメータ

uid
string
必須
ユーザー固有識別子
eventName
string
必須
イベント名(1〜64文字)
platform
string
プラットフォーム。例:webandroidios
イベント固有の追加パラメータはリクエストボディのトップレベルフィールドとして渡します。マルチアイテムイベント(begin_checkoutpurchase)の場合はitems配列を渡します。

レスポンス

message
string
成功時"ok"、バリデーションエラー時"!invalid"
{
    "message": "ok"
}
{
    "message": "!invalid"
}

サポートされるイベント

共通イベント

イベント名説明パラメータ
app_openアプリ起動
sign_up会員登録method(必須)
push_clicksプッシュ通知クリックcampaign_id(必須)
page_viewページ閲覧page_id(必須)、page_categorypage_url
click要素クリックelement_id(必須)、element_typetarget_url

オンライン販売イベント

イベント名説明パラメータ
view_itemアイテム閲覧item_id(必須)、item_nameitem_categorybrandprice
add_to_wishlistウィッシュリストに追加item_id(必須)、item_nameitem_categorybrandprice
add_to_cartカートに追加item_id(必須)、item_nameitem_categorybrandprice(必須)、quantity(必須)、valuecurrency
begin_checkoutチェックアウト開始currencyitems(配列、アイテムごとにitem_id必須)
purchase購入完了tx_id(必須)、currencyitems(配列、アイテムごとにitem_id必須)

リード生成イベント

イベント名説明パラメータ
view_contentコンテンツ閲覧content_id(必須)、content_namecontent_type
begin_lead_formリードフォーム開始form_id(必須)、form_nameform_typeform_destination
generate_leadリード生成form_id(必須)、form_nameform_typeform_destinationvaluecurrency

シンプルなイベント

const axios = require('axios');

axios.post('https://api-v2.adrop.io/event', {
    uid: 'USER_ID',
    eventName: 'app_open'
}, {
    headers: {
        'Authorization': 'YOUR_APP_KEY',
        'Content-Type': 'application/json'
    }
});
import requests

url = "https://api-v2.adrop.io/event"
headers = {
    "Authorization": "YOUR_APP_KEY",
    "Content-Type": "application/json"
}
data = {
    "uid": "USER_ID",
    "eventName": "app_open"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X POST "https://api-v2.adrop.io/event" \
  -H "Authorization: YOUR_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"uid": "USER_ID", "eventName": "app_open"}'

パラメータ付きイベント

const axios = require('axios');

axios.post('https://api-v2.adrop.io/event', {
    uid: 'USER_ID',
    eventName: 'view_item',
    platform: 'web',
    item_id: 'SKU-123',
    item_name: 'Widget',
    item_category: 'Electronics',
    brand: 'BrandX',
    price: 29900
}, {
    headers: {
        'Authorization': 'YOUR_APP_KEY',
        'Content-Type': 'application/json'
    }
});
import requests

url = "https://api-v2.adrop.io/event"
headers = {
    "Authorization": "YOUR_APP_KEY",
    "Content-Type": "application/json"
}
data = {
    "uid": "USER_ID",
    "eventName": "view_item",
    "platform": "web",
    "item_id": "SKU-123",
    "item_name": "Widget",
    "item_category": "Electronics",
    "brand": "BrandX",
    "price": 29900
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X POST "https://api-v2.adrop.io/event" \
  -H "Authorization: YOUR_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "USER_ID",
    "eventName": "view_item",
    "platform": "web",
    "item_id": "SKU-123",
    "item_name": "Widget",
    "item_category": "Electronics",
    "brand": "BrandX",
    "price": 29900
  }'

マルチアイテムイベント(購入)

const axios = require('axios');

axios.post('https://api-v2.adrop.io/event', {
    uid: 'USER_ID',
    eventName: 'purchase',
    platform: 'web',
    tx_id: 'TXN-20240101-001',
    currency: 'KRW',
    items: [
        {
            item_id: 'SKU-001',
            item_name: 'Product A',
            item_category: 'Electronics',
            brand: 'BrandX',
            price: 29900,
            quantity: 1
        },
        {
            item_id: 'SKU-002',
            item_name: 'Product B',
            price: 15000,
            quantity: 2
        }
    ]
}, {
    headers: {
        'Authorization': 'YOUR_APP_KEY',
        'Content-Type': 'application/json'
    }
});
import requests

url = "https://api-v2.adrop.io/event"
headers = {
    "Authorization": "YOUR_APP_KEY",
    "Content-Type": "application/json"
}
data = {
    "uid": "USER_ID",
    "eventName": "purchase",
    "platform": "web",
    "tx_id": "TXN-20240101-001",
    "currency": "KRW",
    "items": [
        {
            "item_id": "SKU-001",
            "item_name": "Product A",
            "item_category": "Electronics",
            "brand": "BrandX",
            "price": 29900,
            "quantity": 1
        },
        {
            "item_id": "SKU-002",
            "item_name": "Product B",
            "price": 15000,
            "quantity": 2
        }
    ]
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X POST "https://api-v2.adrop.io/event" \
  -H "Authorization: YOUR_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "USER_ID",
    "eventName": "purchase",
    "platform": "web",
    "tx_id": "TXN-20240101-001",
    "currency": "KRW",
    "items": [
      {"item_id": "SKU-001", "item_name": "Product A", "price": 29900, "quantity": 1},
      {"item_id": "SKU-002", "item_name": "Product B", "price": 15000, "quantity": 2}
    ]
  }'

リード生成イベント

const axios = require('axios');

axios.post('https://api-v2.adrop.io/event', {
    uid: 'USER_ID',
    eventName: 'generate_lead',
    platform: 'web',
    form_id: 'contact-form-01',
    form_name: 'Contact Us',
    form_type: 'contact',
    form_destination: '/thank-you',
    value: 50000,
    currency: 'KRW'
}, {
    headers: {
        'Authorization': 'YOUR_APP_KEY',
        'Content-Type': 'application/json'
    }
});
import requests

url = "https://api-v2.adrop.io/event"
headers = {
    "Authorization": "YOUR_APP_KEY",
    "Content-Type": "application/json"
}
data = {
    "uid": "USER_ID",
    "eventName": "generate_lead",
    "platform": "web",
    "form_id": "contact-form-01",
    "form_name": "Contact Us",
    "form_type": "contact",
    "form_destination": "/thank-you",
    "value": 50000,
    "currency": "KRW"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X POST "https://api-v2.adrop.io/event" \
  -H "Authorization: YOUR_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "USER_ID",
    "eventName": "generate_lead",
    "platform": "web",
    "form_id": "contact-form-01",
    "form_name": "Contact Us",
    "form_type": "contact",
    "form_destination": "/thank-you",
    "value": 50000,
    "currency": "KRW"
  }'

注意事項

  • 不明なイベント名や必須パラメータが欠落したイベントは無視されます(HTTP 200を返却)。
  • マルチアイテムイベントはリクエストあたり最大100アイテムをサポートします。
  • 文字列パラメータ値は最大1024文字までです。
  • uidは保存前にSHA-256でハッシュ処理されます。

関連ドキュメント

イベントターゲティング

コンソールでイベントベースのオーディエンスターゲティングを設定

コンバージョントラッキング

購入イベントベースのコンバージョントラッキングを設定