Tracking Ingest API
Send conversion events from external systems to SerpWise via HTTP API.
The Tracking Ingest API lets you send conversion events from external systems — CRM webhooks, server-side applications, or third-party integrations — directly to SerpWise for forwarding to your configured ad platform integrations.
Endpoint
POST /tracking/ingestAuthentication
All requests must include an authentication header with your API key.
Authorization: Bearer your-api-keyRequest Body
The request body is a JSON object with an events array. Each event object has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Target platform: meta, tiktok, google_ads, ga4, snapchat, or webhook |
eventType | string | Yes | Conversion event type (e.g., purchase, lead, add_to_cart) |
userData | object | No | User identifiers for attribution matching |
customData | object | No | Event-specific data (value, currency, order ID, etc.) |
userData Fields
| Field | Type | Description |
|---|---|---|
email | string | User email address (auto-hashed before sending to platforms) |
phone | string | User phone number (auto-hashed before sending to platforms) |
firstName | string | User first name (auto-hashed before sending to platforms) |
lastName | string | User last name (auto-hashed before sending to platforms) |
externalId | string | External user ID for cross-platform matching |
ipAddress | string | User IP address |
userAgent | string | User browser user-agent string |
customData Fields
| Field | Type | Description |
|---|---|---|
value | number | Monetary value of the conversion |
currency | string | ISO 4217 currency code (e.g., USD, EUR) |
orderId | string | Transaction or order ID |
contentIds | string[] | Product or content IDs |
contentName | string | Product or content name |
contentType | string | Content category or type |
Example Request
curl -X POST https://your-gateway.example.com/tracking/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"events": [
{
"platform": "meta",
"eventType": "purchase",
"userData": {
"email": "customer@example.com",
"phone": "+1234567890"
},
"customData": {
"value": 99.99,
"currency": "USD",
"orderId": "ORD-12345",
"contentIds": ["SKU-001", "SKU-002"]
}
},
{
"platform": "ga4",
"eventType": "purchase",
"userData": {
"externalId": "user-789"
},
"customData": {
"value": 99.99,
"currency": "USD",
"orderId": "ORD-12345"
}
}
]
}'PII Handling
PII fields in userData — email, phone, first name, and last name — are automatically hashed before being sent to ad platforms. You can send plain-text values; hashing is handled server-side.
If you send pre-hashed values, they will not be double-hashed.
Rate Limits
- Maximum 100 events per request
- Requests exceeding this limit will receive a
400 Bad Requestresponse
Response
Success (200)
{
"processed": 2,
"errors": []
}Partial Failure (207)
{
"processed": 1,
"errors": [
{
"index": 1,
"message": "No active integration found for platform: snapchat"
}
]
}Error (400)
{
"error": "Too many events. Maximum 100 per request."
}Use Cases
- CRM webhooks — Fire a
leadorpurchaseevent when a deal closes in your CRM - Server-side applications — Send conversion events from backend order processing systems
- Third-party integrations — Forward events from payment processors, form builders, or marketing automation tools
- Data pipelines — Replay historical conversion events through SerpWise for backfilling
Platform Rate Limits
SerpWise enforces per-platform rate limits to prevent hitting ad platform API quotas. Events are queued and sent within these limits automatically.
| Platform | Rate Limit | Batch Size |
|---|---|---|
| Meta | 1,000 events/sec | Up to 1,000 per request |
| TikTok | 50 events/sec | Up to 50 per request |
| GA4 | 25 events/sec | Up to 25 per request |
| Google Ads | 100 events/sec | 1 per request |
| Snapchat | 100 events/sec | Automatic batching |
| 100 events/sec | Up to 1,000 per request | |
| Twitter/X | 100 events/sec | Automatic batching |
| Webhook | 50 events/sec | 1 per request |
If your event volume exceeds these limits, the gateway queues events and sends them as capacity becomes available (up to 10 seconds max wait before proceeding). Events are never dropped due to rate limiting.
Auto-Enrichment
When a conversion event is triggered on a page that contains JSON-LD Product structured data or Open Graph product meta tags, SerpWise automatically populates missing value and currency fields from the page data.
This means you can configure a simple fire_conversion_event rule on /products/* pages without complex extraction rules — the gateway extracts pricing from your existing structured data.
Auto-enrichment only fills missing fields. Values explicitly set via extraction rules or the Ingest API are never overwritten. Product data is cached per URL with a 24-hour TTL.
Consent
Events sent via the Ingest API are subject to the same consent checks as gateway-generated events. If the target integration has consent requirements enabled, include consent signals in your request by setting the _sw_consent cookie value in a consent field:
{
"platform": "meta",
"eventType": "Purchase",
"consent": {
"granted": ["marketing"],
"raw": "marketing"
}
}If consent is not included in the request and the integration requires it, the event will be logged with status consent_denied.
GTM / GA4 Script Proxy
Proxy Google tracking scripts through your first-party domain to bypass ad blockers and Safari ITP.
AI Optimizer
Autonomous website optimization — the AI analyzes your traffic, SEO audits, Core Web Vitals, conversion data, geo signals, and bot patterns, then generates and deploys proxy rules that improve your site in real time.