Ingest browser analytics events
curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 1073741823,
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"widget_version": "<string>",
"proxy_origin": "https://app.example.com",
"payload": {},
"modal": "deposit",
"session_properties": {
"enabled_funding_methods": [],
"fiat_methods": {
"source": "backend_resolved"
},
"asset_migration_providers": [
"<string>"
],
"initial_asset_migration": "<string>",
"gasless_wallet_flow_enabled": true,
"overlay_close_enabled": true,
"prefills": {
"source_chain": true,
"source_token": true,
"amount": true,
"initial_asset_migration": true
},
"target_chain": "eip155:8453",
"target_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
}
]
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events"
payload = { "events": [
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 1073741823,
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"widget_version": "<string>",
"proxy_origin": "https://app.example.com",
"payload": {},
"modal": "deposit",
"session_properties": {
"enabled_funding_methods": [],
"fiat_methods": { "source": "backend_resolved" },
"asset_migration_providers": ["<string>"],
"initial_asset_migration": "<string>",
"gasless_wallet_flow_enabled": True,
"overlay_close_enabled": True,
"prefills": {
"source_chain": True,
"source_token": True,
"amount": True,
"initial_asset_migration": True
},
"target_chain": "eip155:8453",
"target_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sequence: 1073741823,
type: '<string>',
timestamp: '2023-11-07T05:31:56Z',
widget_version: '<string>',
proxy_origin: 'https://app.example.com',
payload: {},
modal: 'deposit',
session_properties: {
enabled_funding_methods: [],
fiat_methods: {source: 'backend_resolved'},
asset_migration_providers: ['<string>'],
initial_asset_migration: '<string>',
gasless_wallet_flow_enabled: true,
overlay_close_enabled: true,
prefills: {
source_chain: true,
source_token: true,
amount: true,
initial_asset_migration: true
},
target_chain: 'eip155:8453',
target_token: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
}
}
]
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/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([
'events' => [
[
'event_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sequence' => 1073741823,
'type' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'widget_version' => '<string>',
'proxy_origin' => 'https://app.example.com',
'payload' => [
],
'modal' => 'deposit',
'session_properties' => [
'enabled_funding_methods' => [
],
'fiat_methods' => [
'source' => 'backend_resolved'
],
'asset_migration_providers' => [
'<string>'
],
'initial_asset_migration' => '<string>',
'gasless_wallet_flow_enabled' => true,
'overlay_close_enabled' => true,
'prefills' => [
'source_chain' => true,
'source_token' => true,
'amount' => true,
'initial_asset_migration' => true
],
'target_chain' => 'eip155:8453',
'target_token' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"accepted": 25
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "Analytics event conflict",
"code": "SESSION_ATTRIBUTION_CONFLICT"
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Analytics
Ingest browser analytics events
Durably stores a bounded browser event batch. Authentication is optional: a purpose-limited analytics ingest bearer token attributes the session, while an omitted credential stores it unattributed. Project API keys are not accepted.
POST
/
analytics
/
events
Ingest browser analytics events
curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 1073741823,
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"widget_version": "<string>",
"proxy_origin": "https://app.example.com",
"payload": {},
"modal": "deposit",
"session_properties": {
"enabled_funding_methods": [],
"fiat_methods": {
"source": "backend_resolved"
},
"asset_migration_providers": [
"<string>"
],
"initial_asset_migration": "<string>",
"gasless_wallet_flow_enabled": true,
"overlay_close_enabled": true,
"prefills": {
"source_chain": true,
"source_token": true,
"amount": true,
"initial_asset_migration": true
},
"target_chain": "eip155:8453",
"target_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
}
]
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events"
payload = { "events": [
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 1073741823,
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"widget_version": "<string>",
"proxy_origin": "https://app.example.com",
"payload": {},
"modal": "deposit",
"session_properties": {
"enabled_funding_methods": [],
"fiat_methods": { "source": "backend_resolved" },
"asset_migration_providers": ["<string>"],
"initial_asset_migration": "<string>",
"gasless_wallet_flow_enabled": True,
"overlay_close_enabled": True,
"prefills": {
"source_chain": True,
"source_token": True,
"amount": True,
"initial_asset_migration": True
},
"target_chain": "eip155:8453",
"target_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sequence: 1073741823,
type: '<string>',
timestamp: '2023-11-07T05:31:56Z',
widget_version: '<string>',
proxy_origin: 'https://app.example.com',
payload: {},
modal: 'deposit',
session_properties: {
enabled_funding_methods: [],
fiat_methods: {source: 'backend_resolved'},
asset_migration_providers: ['<string>'],
initial_asset_migration: '<string>',
gasless_wallet_flow_enabled: true,
overlay_close_enabled: true,
prefills: {
source_chain: true,
source_token: true,
amount: true,
initial_asset_migration: true
},
target_chain: 'eip155:8453',
target_token: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
}
}
]
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/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([
'events' => [
[
'event_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sequence' => 1073741823,
'type' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'widget_version' => '<string>',
'proxy_origin' => 'https://app.example.com',
'payload' => [
],
'modal' => 'deposit',
'session_properties' => [
'enabled_funding_methods' => [
],
'fiat_methods' => [
'source' => 'backend_resolved'
],
'asset_migration_providers' => [
'<string>'
],
'initial_asset_migration' => '<string>',
'gasless_wallet_flow_enabled' => true,
'overlay_close_enabled' => true,
'prefills' => [
'source_chain' => true,
'source_token' => true,
'amount' => true,
'initial_asset_migration' => true
],
'target_chain' => 'eip155:8453',
'target_token' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/analytics/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence\": 1073741823,\n \"type\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"widget_version\": \"<string>\",\n \"proxy_origin\": \"https://app.example.com\",\n \"payload\": {},\n \"modal\": \"deposit\",\n \"session_properties\": {\n \"enabled_funding_methods\": [],\n \"fiat_methods\": {\n \"source\": \"backend_resolved\"\n },\n \"asset_migration_providers\": [\n \"<string>\"\n ],\n \"initial_asset_migration\": \"<string>\",\n \"gasless_wallet_flow_enabled\": true,\n \"overlay_close_enabled\": true,\n \"prefills\": {\n \"source_chain\": true,\n \"source_token\": true,\n \"amount\": true,\n \"initial_asset_migration\": true\n },\n \"target_chain\": \"eip155:8453\",\n \"target_token\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"accepted": 25
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "Analytics event conflict",
"code": "SESSION_ATTRIBUTION_CONFLICT"
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Authorizations
Optional five-minute analytics ingest token. Omit it to store an unattributed session.
Body
application/json
Required array length:
1 - 50 elements- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Response
The complete batch is durably represented
Required range:
1 <= x <= 50Was this page helpful?