이벤트 전송
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