Send In-Web events in a server-to-server method.rate limit : 1000 requests per minute.
User Identifiers
AttentionIt is recommended to send all available user identifiers as they are crucial for accurate attribution, postback, cohort analysis etc.
1. Cookie ID(browser.clientID)
Cookie IDs can be retrieved through the SDK(refer to the data fetching guide).The attribution data must be sent along with the Cookie ID for proper attribution.Get the attribution data from resource.attributionData in the Web SDK fetchResource callback. For details, refer to Data Fetching - Web.
Request Body Key
Value
eventData.shortID
resource.attributionData.shortID
eventData.trackingData
The entire resource.attributionData.trackingData object
eventData.goal
Enter the event information to send.
attributionData
resource.attributionData
Place attributionData at the top level of the request, at the same level as eventData. Send eventData.shortID and eventData.trackingData as well.
attributionData is the data required for attribution. Be careful not to modify it.
airbridge.fetchResource(function(resource) { const attributionData = resource.attributionData const body = { browser: { clientID: resource.browser.clientID, userAgent: resource.browser.userAgent, }, eventData: { shortID: attributionData.shortID, trackingData: attributionData.trackingData, goal: { category: "airbridge.ecommerce.order.completed", }, }, attributionData: attributionData, } // Pass body to your server and use it as the S2S API request body.})
User IDs may be sent without Cookie IDs if data fetching is inconvenient.In such cases, Airbridge processes events based on the Cookie IDs mapped to the provided User ID.However, if no mapping is found, this may lower the accuracy of reports.
You can specify the language to use for API requests and responses. It follows the ISO-639-1 format.
string
Represents the media type of the resource. Defaults to application/json.
string
The key value to use for API requests. Instructions for getting API keys are in “how to generate API Keys”.
string
required
You can send the user’s IP in the X-Forwarded-For header. Without X-Forwarded-For, user behavior is logged with the IP of the server that requested the Server To Server API, not the user’s IP (client request IP).We accept values in the form of ipv4 (123.123.123.123), ipv6 (2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d).
Path Params
string
required
Airbridge App Name. (Unique ID)
Body Params
string
Random UUID v4 string.Accepts a random string in UUID4 format.The event uuid is a unique ID for the event, and will be generated automatically by the event api if not provided.
number
The time the event occurred. (default: current timestamp)A Unix timestamp in milliseconds (13 digits in Unixtime).If the eventTimestamp is older than 24 hours from the time the event was sent, it will not be processed by the server.
object
User information.
Show child attributes
string
User ID.Required when: required if device.deviceUUID is not sent.
string
User email.
string
User phone number.
object
Custom user attributes.Accepts data in JSON format.{ "age_group": "30", "brand": "Nike" }
object
Browser Information.
Show child attributes
string
required
Browser cookie ID fetched from the SDK. [Docs]If data fetching isn’t possible, sending the User ID(user.externalUserID) will make this field optional.
string
Browser’s user agent fetched from the sdk. [Docs]This field is used to decide the platform, OS name and OS version of the event.
object
required
Event information.
Show child attributes
string
required
Attribution campaign parameter Short ID. Provide the value fetched from the Airbridge SDK(AndroidiOS).NOTE: This value must be sent to the Airbridge server without processing or filtering.If data fetching is not an option, sending the User ID(user.externalUserID) will make this field optional.
object
required
Tracking data from SDK.Send the resource.attributionData.trackingData object fetched from the Web SDK as is, without splitting it into child fields.
Show child attributes
string
required
Attribution campaign channel. Provide the value fetched from the Airbridge SDK(AndroidiOS).NOTE: This value must be sent to the Airbridge server without processing or filtering. (eg. values such as airbridge.websdk must also be sent)If data fetching is not an option, sending the User ID(user.externalUserID) will make this field optional.
object
required
Attribution campaign parameters. Accepts data in JSON format.Provide the value fetched from the Airbridge SDK(AndroidiOS).NOTE: This value must be sent to the Airbridge server without processing or filtering.If data fetching is not an option, sending the User ID(user.externalUserID) will make this field optional.
object
required
An object that can contain information about an event. It can contain categories, actions, labels, values, and semantic attributes. (Related Guide)
Event’s value.This may represent the product value of purchase events, or revenue for ad impressions etc.
object
Custom event attribute.{ "color": "red" }
object
Semantic Attributes. Predefined attributes for which Airbridge is supposed to collect data.
Show child attributes
string
Airbridge event property 1
string
Airbridge event property 2
string
User search query.
string
Product list ID.
string
Cart ID.
string
Transaction ID.
boolean
In-app purchases or not.true for in-app purchase, false for not an in-app purchase.
string
The currency for the payment event. You can use the currency used for the actual payment, as it will be converted to the currency set in your dashboard during event processing.
object[]
Product list.
Show child attributes
string
Product position.
string
Product ID.
string
Product name.
number
Product Price.
integer
Product quantity.
string
Currency.
object
Data required for attribution. Send the resource.attributionData fetched from the Web SDK. [Docs]Place it at the same level as eventData.NOTE: Be careful not to modify this data.If data fetching is not an option, sending the User ID(user.externalUserID) will make this field optional.