Server To Server Event

    Send In-App/In-Web events in a server to server method.


    Send In-web Events

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/web/9320

    Send In-Web events in a server-to-server method.

    Delivery Methods

    Use when attribution based on Cookie ID in the Web SDK is required. [Data fetching guide].

    2. Sending events based on User ID (user.externalUserId).

    Use when you need attribution based on User ID rather than attribution via Cookie ID. Airbridge attributes based on the browser.clientID that is already matched to user.externalUserID in the internal ID table. When matching using User ID, you do not need to send the Client ID, and the fields below become optional parameters.

    Paramter

    Description

    eventData.shortID

    Attribution campaign parameter ID

    eventData.trackingData.channel

    Attribution campaign parameter channel

    eventData.trackingData.params

    Attribution campaign parameter

    Request

    Headers

    X-Forwarded-For
    Requiredstring

    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

    app_name
    Requiredstring

    Airbridge App Name. (Unique ID)

    Body Params

    eventUUID
    string

    Random UUID v4 string.

    Accepts a random string in UUID4 format.

    The event uuid is used for duplication as a unique ID for the event, and will be generated automatically by the event api if not provided.

    eventTimestamp
    number

    The time the event occurred.

    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. Please use a timestamp within 24 hours from the time it was sent.

    user
    object

    User information.

    user.externalUserID
    Requiredstring

    User ID.

    If sending events based on User ID (user.externalUserId), browser.clientID will not be a required field.

    user.externalUserEmail
    string

    User email.

    user.externalUserPhone
    string

    User phone number.

    user.attributes
    object

    Custom user attributes.

    Accepts data in JSON format.

    { "age_group": "30", "brand": "Nike" }

    browser
    object

    Browser Information.

    browser.clientID
    Requiredstring

    Browser cookie ID. The values fetched from the SDK are required. [Docs]

    If sending events based on cookie ID (browser.clientID), user.externalUserId is not a required field.

    browser.userAgent
    string

    Browser's user agent.

    eventData
    object

    Event information.

    eventData.shortID
    Requiredstring

    Attribution campaign parameter Short ID.

    Provided the value fetched from the Airbridge SDK. Android iOS

    If sending events based on User ID (user.externalUserId), this will not be a required field.

    eventData.trackingData
    Requiredobject

    Tracking data from SDK.

    eventData.trackingData.channel
    Requiredstring

    Attribution campaign channel.

    Provided the value fetched from the Airbridge SDK. Android iOS

    If sending events based on User ID (user.externalUserId), this is not a required field.

    eventData.trackingData.params
    Requiredobject

    Attribution campaign parameters. Accepts data in JSON format.

    Provided the value fetched from the Airbridge SDK. Android iOS

    If sending events based on User ID (user.externalUserId), this will not be a required field.

    eventData.goal
    object

    An object that can contain information about an event. It can contain categories, actions, labels, values, and semantic attributes.

    eventData.goal.category
    Requiredstring
    eventData.goal.action
    string

    Event action.

    eventData.goal.label
    string

    Event label.

    eventData.goal.value
    number

    Event value.

    eventData.goal.semanticAttributes
    object

    Semantic Attributes. Predefined attributes for which Airbridge is supposed to collect data.

    eventData.goal.semanticAttributes.query
    string

    User search query.

    eventData.goal.semanticAttributes.productListID
    string

    Product list ID.

    eventData.goal.semanticAttributes.cartID
    string

    Cart ID.

    eventData.goal.semanticAttributes.transactionID
    string

    Transaction ID.

    eventData.goal.semanticAttributes.inAppPurchased
    boolean

    In-app purchases or not.

    true for in-app purchase, false for not an in-app purchase.

    eventData.goal.semanticAttributes.products
    object[]

    Product list.

    eventData.goal.semanticAttributes.products.[0].position
    string

    Product position.

    eventData.goal.semanticAttributes.products.[0].productID
    string

    Product ID.

    eventData.goal.semanticAttributes.products.[0].name
    string

    Product name.

    eventData.goal.semanticAttributes.products.[0].price
    number

    Product Price.

    eventData.goal.semanticAttributes.products.[0].quantity
    string

    Product quantity.

    eventData.goal.semanticAttributes.products.[0].currency
    string

    Currency.

    eventData.goal.customAttributes
    object

    Custom event attribute.

    { "color": "red" }


    Send In-app Events

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/mobile-app/9360

    Send In-App events in a server-to-server method.

    Delivery Methods

    1. Sending events based on device ID (device.deviceUUID).

    Use when attribution based on the SDK's Device ID. [Data fetching guide]

    2. Sending events based on User ID (user.externalUserID).

    Use when attribution based on the User ID. Airbridge attributes based on devices that already have a match to user.externalUserID in its internal ID table. When matching using User ID, you do not need to send the Device ID.

    Request

    Headers

    X-Forwarded-For
    Requiredstring

    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

    app_name
    Requiredstring

    Airbridge App Name. (Unique ID)

    Body Params

    eventUUID
    string

    Random UUID v4 string. Accepts a random string in UUID4 format.

    eventTimestamp
    Requirednumber

    The time the event occurred.

    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. Please use a timestamp within 24 hours from the time it was sent.

    user
    string

    User information.

    user.externalUserID
    string

    User ID.

    user.externalUserEmail
    string

    User email.

    user.externalUserPhone
    string

    User phone number.

    user.attributes
    object

    Custom user attributes.

    `{ "age_group": "30", "brand": "Nike" }`

    device
    object

    Device Information.

    device.deviceUUID
    Requiredstring

    Airbridge device ID.

    Accepts GAID, IDFA, IDFV, or Randomly Generated UUID.

    device.gaid
    Requiredstringnullable
    device.ifa
    Requiredstringnullable
    device.ifv
    Requiredstringnullable
    device.limitAdTracking
    string

    The device's ad tracking restriction setting.

    true for limit ad tracking, false for allow ad tracking. Android iOS

    device.deviceModel
    Requiredstring

    Device model name Android iOS

    device.deviceIdentifier
    string

    A specific device identifier, such as iPhone11,2 (iPhone only).

    device.manufacturer
    string

    Device manufacturer Android iOS

    device.osName
    Requiredenum

    Device OS name. (e.g. "Android", "iOS") (Case sensitive)

    ENUM VALUES
    Android

    Android OS

    iOS

    iOS

    device.osVersion
    Requiredstring

    Device OS version Android iOS

    device.locale
    string

    Device locale Android iOS

    device.timezone
    string

    Device timezone Android iOS

    device.orientation
    string

    Device orientation Android iOS

    device.screen
    string

    Device screen information.

    device.screen.density
    string

    Device screen density Android iOS

    device.screen.height
    number

    Device screen height Android iOS

    device.screen.width
    number

    Device screen width Android iOS

    device.location
    object

    Device location.

    device.location.longitude
    number
    device.location.latitude
    number
    device.location.altitude
    number
    device.location.speed
    string
    device.network
    object

    Device network information.

    device.network.carrier
    string

    Device network carrier Android iOS

    device.network.bluetooth
    boolean

    Device Bluetooth activated or not.

    true if bluetooth is on, false if bluetooth is off. Android

    device.network.cellular
    boolean

    Device cellular data activated or not.

    true if cellular data is on, false if cellular data is off. Android iOS

    device.network.wifi
    boolean

    Device's Wi-Fi is activated or not.

    true if wifi is on, false if wifi is off. Android iOS

    app
    Requiredobject

    User app information.

    app.packageName
    Requiredstring

    Name of the App's package as registered on the Google Play Store or the Apple App Store

    app.version
    string

    Version of the app. Android iOS

    eventData
    Requiredobject

    Event information.

    eventData.goal
    Requiredobject

    An object that can contain information about an event. It can contain categories, actions, labels, values, and semantic attributes.

    eventData.goal.category
    Requiredstring
    eventData.goal.action
    string

    Event action.

    eventData.goal.label
    string

    Event label.

    eventData.goal.value
    number

    Event value.

    eventData.goal.semanticAttributes
    object
    eventData.goal.semanticAttributes.productListID
    string

    Product list ID.

    eventData.goal.semanticAttributes.cartID
    string

    Cart ID.

    eventData.goal.semanticAttributes.transactionID
    string

    Transaction ID.

    eventData.goal.semanticAttributes.inAppPurchased
    boolean

    In-app purchases or not.

    true for in-app purchase, false for not an in-app purchase.

    eventData.goal.semanticAttributes.products
    object[]

    Product list

    eventData.goal.semanticAttributes.products.[0].position
    number

    Product postition.

    eventData.goal.semanticAttributes.products.[0].productID
    string

    Product ID.

    eventData.goal.semanticAttributes.products.[0].name
    string

    Product name.

    eventData.goal.semanticAttributes.products.[0].price
    number

    Product price.

    eventData.goal.semanticAttributes.products.[0].quantity
    string

    Product quantity.

    eventData.goal.semanticAttributes.products.[0].currency
    string

    Product currency.

    eventData.goal.customAttributes
    object

    Custom event attribute.

    `{ "color": "red" }`

    Was this page helpful?

    Have any questions or suggestions?