Send server-side event
curl --request POST \
--url https://track.scanova.io/server-events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": [
"prod_1",
"prod_2"
]
}
}
'import requests
url = "https://track.scanova.io/server-events"
payload = {
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": ["prod_1", "prod_2"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_id: 'site_abc123',
event_name: 'purchase',
scan_session_id: '550e8400-e29b-41d4-a716-446655440000',
conversion_value: {amount: 99.99, currency: 'USD'},
user_identifiers: {
email_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
external_id: 'user_12345'
},
properties: {order_id: 'order_789', product_ids: ['prod_1', 'prod_2']}
})
};
fetch('https://track.scanova.io/server-events', 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://track.scanova.io/server-events",
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([
'site_id' => 'site_abc123',
'event_name' => 'purchase',
'scan_session_id' => '550e8400-e29b-41d4-a716-446655440000',
'conversion_value' => [
'amount' => 99.99,
'currency' => 'USD'
],
'user_identifiers' => [
'email_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'external_id' => 'user_12345'
],
'properties' => [
'order_id' => 'order_789',
'product_ids' => [
'prod_1',
'prod_2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://track.scanova.io/server-events"
payload := strings.NewReader("{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://track.scanova.io/server-events")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://track.scanova.io/server-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "Event received"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}مرجع الواجهة
واجهة أحداث الخادم — POST /server-events
أرسل حدث تحويل واحدًا موثّقًا من الخادم لديك — عملية شراء أو تسجيل أو عميلًا محتملًا أو أي إجراء خلفي آخر — منسوبًا إلى مسح رمز QR الذي جاء بالزائر.
POST
/
server-events
Send server-side event
curl --request POST \
--url https://track.scanova.io/server-events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": [
"prod_1",
"prod_2"
]
}
}
'import requests
url = "https://track.scanova.io/server-events"
payload = {
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": ["prod_1", "prod_2"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_id: 'site_abc123',
event_name: 'purchase',
scan_session_id: '550e8400-e29b-41d4-a716-446655440000',
conversion_value: {amount: 99.99, currency: 'USD'},
user_identifiers: {
email_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
external_id: 'user_12345'
},
properties: {order_id: 'order_789', product_ids: ['prod_1', 'prod_2']}
})
};
fetch('https://track.scanova.io/server-events', 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://track.scanova.io/server-events",
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([
'site_id' => 'site_abc123',
'event_name' => 'purchase',
'scan_session_id' => '550e8400-e29b-41d4-a716-446655440000',
'conversion_value' => [
'amount' => 99.99,
'currency' => 'USD'
],
'user_identifiers' => [
'email_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'external_id' => 'user_12345'
],
'properties' => [
'order_id' => 'order_789',
'product_ids' => [
'prod_1',
'prod_2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://track.scanova.io/server-events"
payload := strings.NewReader("{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://track.scanova.io/server-events")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://track.scanova.io/server-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "Event received"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}استخدم نقطة الوصول هذه للإبلاغ عن تحويل واحد يقع في الخادم. ولإرسال عدة أحداث في طلب واحد، استخدم POST /server-events/batch.
أنشئ قيمة
X-API-Key المطلوبة من موقع التتبع لديك: التحليلات ← تتبع التحويلات ← إعداد تتبع التحويلات، ثم إعداد التتبع ← تتبع عبر API في موقعك.
راجع إرسال أحداث الخادم للاطلاع على أمثلة برمجية بلغات Node.js وPython وPHP وcURL.التفويضات
Site-scoped server API key generated from Dashboard > Analytics > Conversion Tracking > Script/API > API tab
الجسم
application/json
Tracking site ID
Required string length:
1 - 64Event name (normalized to lowercase/underscore by API)
Required string length:
1 - 64QR scan session id from scnv redirect
Unique event ID for deduplication
Event occurrence time
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Custom properties. Max serialized size 10KB. Do not include raw email addresses.
Consent signal propagated from browser-side tracking
الخيارات المتاحة:
granted, denied, pending هل كانت هذه الصفحة مفيدة؟