イベント送信
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"
}
REST API
イベント送信
REST APIを使用してユーザー行動イベントを送信する方法を案内します。
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"
}
ユーザー行動イベントを送信して、イベントベースのオーディエンスターゲティングを構築できます。イベントデータはオーディエンスセグメンテーションおよびコンバージョントラッキングに活用されます。
イベント固有の追加パラメータはリクエストボディのトップレベルフィールドとして渡します。マルチアイテムイベント(
リクエストパラメータ
ヘッダー
App Key(adrop_service.jsonで確認)
application/jsonボディパラメータ
ユーザー固有識別子
イベント名(1〜64文字)
プラットフォーム。例:
web、android、iosbegin_checkout、purchase)の場合はitems配列を渡します。
レスポンス
成功時
"ok"、バリデーションエラー時"!invalid"{
"message": "ok"
}
{
"message": "!invalid"
}
サポートされるイベント
共通イベント
| イベント名 | 説明 | パラメータ |
|---|---|---|
app_open | アプリ起動 | — |
sign_up | 会員登録 | method(必須) |
push_clicks | プッシュ通知クリック | campaign_id(必須) |
page_view | ページ閲覧 | page_id(必須)、page_category、page_url |
click | 要素クリック | element_id(必須)、element_type、target_url |
オンライン販売イベント
| イベント名 | 説明 | パラメータ |
|---|---|---|
view_item | アイテム閲覧 | item_id(必須)、item_name、item_category、brand、price |
add_to_wishlist | ウィッシュリストに追加 | item_id(必須)、item_name、item_category、brand、price |
add_to_cart | カートに追加 | item_id(必須)、item_name、item_category、brand、price(必須)、quantity(必須)、value、currency |
begin_checkout | チェックアウト開始 | currency、items(配列、アイテムごとにitem_id必須) |
purchase | 購入完了 | tx_id(必須)、currency、items(配列、アイテムごとにitem_id必須) |
リード生成イベント
| イベント名 | 説明 | パラメータ |
|---|---|---|
view_content | コンテンツ閲覧 | content_id(必須)、content_name、content_type |
begin_lead_form | リードフォーム開始 | form_id(必須)、form_name、form_type、form_destination |
generate_lead | リード生成 | form_id(必須)、form_name、form_type、form_destination、value、currency |
例
シンプルなイベント
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でハッシュ処理されます。
関連ドキュメント
イベントターゲティング
コンソールでイベントベースのオーディエンスターゲティングを設定
コンバージョントラッキング
購入イベントベースのコンバージョントラッキングを設定
このページは役に立ちましたか?
⌘I