To optimize your marketing strategy, it is crucial to track and measure events in your digital service and understand user behavior. Define the events you want to track with Airbridge using the Airbridge event properties.
In Airbridge, an event is defined by its properties, namely the Event Category, Event Action, Event Label, Event Value, Attributes, and Trigger.
Event Property | Data Type | Description |
---|---|---|
Event Category | string | - Required for all events - Used for event naming and postback configuration - For Standard Events, the Event Category is pre-set by Airbridge |
Event Action; Event Label | string | - Used to collect event details in addition to the Event Category - Can be viewed in Airbridge reports |
Event Value | float | - Used to collect numerical data for calculations |
Attributes | Varies by Attribute | - Used to collect event details in addition to the Event Action and Event Label - Cannot be viewed in Airbridge reports - Is divided into Semantic Attributes and Custom Attributes; Semantic Attributes are Airbridge’s presets |
Trigger | - | - Required for all events - Determines the point at which an event is collected, which is ideally the point at which the event takes place |
The Event Category is an essential property that must be configured to define an event. In addition to being used as the name of an event, the Event Category can be used when you select the events to send via postbacks.
Events are divided into Standard Events and Custom Events. The Event Category of Standard Events is pre-set by Airbridge, whereas that of Custom Events shall be configured by Airbridge users.
The Event Category is subject to the following rules:
The Event Category is case-sensitive.
For Standard Events, the Event Category is pre-set by Airbridge.
For Custom Events, the Event Category can include letters in mixed case and numbers, but cannot start with airbridge.
. As for the use of symbols, it is advised to use underscores _
only. The maximum length is 128 characters.
Data collected as the Event Category is subject to the following limitations:
The event cannot be collected in case of a data type mismatch. The data type of the Event Category is string.
If the data to be collected exceeds the maximum length, it is truncated to the maximum length, which is 128 characters for the Event Category.
Select a metric to view the event count where the metric name corresponds to the Event Category. Data collected as the Event Category can be viewed by selecting the “Event Category” GroupBy or filter in Airbridge reports or as a property in raw data exports.
By configuring the Event Action and the Event Label, you can determine up to 2 additional event details to collect. Data collected as the Event Action and Event Label can be viewed in Airbridge reports.
Event details collected as Event Action and Event Label
Any event detail can be collected as the Event Action and the Event Label. The event details are not related to the literal definitions of the words action and label. This means that you can use the Event Action to collect event details that are not related to user actions.
The Event Action and the Event Label are subject to the following rules:
The Event Action and the Event Label can include letters in mixed cases and numbers and are case-sensitive. The maximum length is 128 characters.
As for the use of symbols, it is advised to use underscores _
only. Spaces and the following symbols are also supported: ?
, !
, ,
, .
, /
, &
, (
, )
.
Data collected as the Event Action and Event Label is subject to the following limitations:
The event cannot be collected in case of a data type mismatch. The data types of both the Event Action and the Event Label are strings.
If the data to be collected exceeds the maximum length, it is truncated to the maximum length, which is 128 characters for both the Event Action and the Event Label.
Data collected as the Event Action and the Event Label can be viewed by selecting the “Event Action” and “Event Label” GroupBys in Airbridge reports.
The Event Value must be configured to perform calculations with numerical data collected. Only data collected as the Event Value can be used for calculations in Airbridge. Numbers with up to 9 decimal places can be collected.
For instance, you must have configured the Event Value to find out your total revenue by adding up the prices of the products sold or your total subscription revenue by adding subscription fees in the Revenue Report.
Data collected as the Event Value can be used for calculations with other data collected as the Event Value. Data collected as the Event Action or the Event Label cannot be used for calculations. Note that the event count is tracked whether or not the Event Value is configured.
Let’s say you have collected data for the “Order Complete” event as shown in the following table:
Event Category | Event Action | Event Label | Event Value |
---|---|---|---|
| 1,000 | 100 | 10,000 |
| 1,000 | 200 | 20,000 |
The data collected as the Event Value can be used for calculations. Therefore, you can add the 2 pieces of data to get a sum of 30,000 for the event.
Data collected as the Event Action or the Event Label cannot be used for calcaulations, but you can still view the event count. Therefore, Airbridge reports will show that there were 2 times when the Event Action was 1000 and 1 time when the Event Label was 100 and 200, respectively.
Data collected as the Event Value is subject to the following limitations:
The event cannot be collected in case of a data type mismatch. The data type of the Event Label is float.
If the data to be collected exceeds the maximum length, it is truncated to the maximum length, which is up to 9 decimal places for the Event Value.
Attention
Data collected as the Attribute cannot be viewed in Airbridge reports. If you want to collect event details and view them in Airbridge reports, use the Event Action and the Event Label.
Attributes can be used to collect additional event details. Data collected as the Attribute can be viewed only via raw data exports but not in Airbridge reports.
Attributes are divided into Semantic Attributes and Custom Attributes. Semantic Attributes are pre-defined by Airbridge, whereas Custom Attributes can be configured by Airbridge users.
Semantic Attributes are pre-defined by Airbridge. Read on to learn more about Semantic Attributes and their use cases.
Find the Semantic Attributes supported by Airbridge below.
Name | Data Type | Key | Description |
---|---|---|---|
Currency | string |
| The 3-letter currency code of the standard currency set in Airbridge |
Currency (Original) | string |
| The 3-letter currency code of the currency used in the source data |
Product List | array |
| The list of products; Refer to this example |
Product ID | string |
| The ID of the first product in the product list |
Product Name | string |
| The name of the first product in the product list |
Product Price | float |
| The price of the first product in the product list; Negative numbers are supported for refunds and exchanges |
Product Quantity | int |
| The quantity of the first product in the product list |
Product Currency | string |
| The 3-letter currency code for the price of the first product in the product list |
Product Position | int |
| The placement of the first product in the product list |
Product Category ID | string |
| The ID of the product category that includes the first product in the product list |
Product Category Name | string |
| The name of the product category that includes the first product in the product list |
Product Brand ID | string |
| The ID of the brand of the first product in the product list |
Product Brand Name | string |
| The name of the brand of the first product in the product list |
Period | string |
| The duration in ISO 8601 format Example values: P7D, P1M, P6M, P1Y |
Is Renewal Event | boolean |
| The renewal status |
Renewal Count | int |
| The number of renewals |
Product List ID | string |
| The product list ID |
Cart ID | string |
| The cart ID |
Transaction ID | string |
| The transaction ID |
Transaction Type | string |
| The type of transaction, following the convention set by each Airbridge user; Cancelled transactions are always recorded as “cancel” |
Transaction Paired Event Category | string |
| The Event Category of the transaction-related event; Event details are available in case of the “Order Cancel” event |
Transaction Paired Event Timestamp | int |
| The time of occurrence of the transaction-related event in a 13-digit timestamp in milliseconds |
Total Quantity | int |
| The total quantity; The sum of the product quantities is automatically collected even when the total quantity is not defined |
Search Query | string |
| The query requested by the user |
In App Purchased | boolean |
| Whether or not it is an in-app purchase - true: Is an in-app purchase - false: Is not an in-app purchase |
Contribution Margin | float |
| Contribution margin, or the revenue left after covering the variable costs, in the standard currency set in Airbridge; Not calculated by Airbridge |
Contribution Margin (Original) | float |
| Contribution margin, or the revenue left after covering the variable costs, in the currency specified by the source data; Not calculated by Airbridge |
List ID | string |
| The list ID |
Rate ID | string |
| The rate ID |
Rate | float |
| The rating |
Max Rate | float |
| The highest rating |
Achievement ID | string |
| The achievement ID |
Shared Channel | string |
| The shared channel |
Date Time | string |
| The date and time in ISO-8601 format |
Description | string |
| The description |
Is Revenue Event | boolean |
| Whether or not it is a revenue-related event - true: Is a revenue-related event - false: Is not a revenue-related event |
Place | string |
| The place |
Schedule ID | string |
| The schedule ID |
Type | string |
| The type |
Level | string |
| The level |
Score | float |
| The score |
Refer to the example code below.
// Example code for semanticAttributes
airbridge.events.send("purchase_card", {
semanticAttributes: {
transactionID: '1458132a-0d09-4944-a686-fcbee81b74f7',
products: [{
productID: "1234",
name: "Nike 1",
price: 55,
currency: "USD",
quantity: 1
}, {
productID: "1235",
name: "Nike 2",
price: 44,
currency: "USD",
quantity: 1
}]
}
});
#import <AirBridge/ABInAppEvent.h>
ABInAppEvent* event = [[ABInAppEvent alloc] init];
[event setCategory:@"purchase_card"];
NSDictionary* semantics = @{
@"transactionID": @"1458132a-0d09-4944-a686-fcbee81b74f7",
@"products": @[@{
@"productID": @"1234",
@"name": @"Nike 1",
@"price": @55,
@"currency": @"USD",
@"quantity": @1,
}, @{
@"productID": @"1235",
@"name": @"Nike 2",
@"price": @44,
@"currency": @"USD",
@"quantity": @1,
}],
};
[event setSemantics:semantics];
[event send];
let event = ABInAppEvent()
event?.setCategory("purchase_card")
let semantics: [String: Any] = [
"transactionID": "1458132a-0d09-4944-a686-fcbee81b74f7",
"products": [[
"productID": "1234",
"name": "Nike 1",
"price": 55,
"currency": "USD",
"quantity": 1,
], [
"productID": "1235",
"name": "Nike 2",
"price": 44,
"currency": "USD",
"quantity": 1,
]]
]
event?.setSemantics(semantics)
event?.send()
Map<String, Object> product1 = new HashMap<>();
product1.put("productID", "1234");
product1.put("name", "Nike 1");
product1.put("price", 55);
product1.put("currency", "USD");
product1.put("quantity", 1);
Map<String, Object> product2 = new HashMap<>();
product1.put("productID", "1235");
product1.put("name", "Nike 2");
product1.put("price", 44);
product1.put("currency", "USD");
product1.put("quantity", 1);
List<Map<String, Object>> products = new ArrayList<>();
products.add(product1);
products.add(product2);
Map<String, Object> semanticAttributes = new HashMap<>();
semanticAttributes.put("transactionID", "1458132a-0d09-4944-a686-fcbee81b74f7");
semanticAttributes.put("product", products);
Airbridge.trackEvent(
"purchase_card", // Category
null, // Action
null, // Label
null, // Value
null, // Custom Attributes
semanticAttributes // Semantic Attributes
);
Airbridge.trackEvent(
category = "purchase_card",
semanticAttributes = mapOf(
"transactionID" to "1458132a-0d09-4944-a686-fcbee81b74f7",
"products" to mapOf(
"product" to listOf(
mapOf(
"productID" to "1234",
"name" to "Nike 1",
"price" to 55,
"currency" to "USD",
"quantity" to 1
),
mapOf(
"productID" to "1235",
"name" to "Nike 2",
"price" to 44,
"currency" to "USD",
"quantity" to 1
)
)
)
)
)
The following example shows how to send the product list data to Airbridge.
airbridge.events.addedToCart({
products: [
{
productID: "1",
name: "MacBook Pro",
price: 1500000,
quantity: 3
},
{
productID: "2",
name: "MacBook Air",
price: 1500000,
quantity: 2
}
],
cartID: "73926365"
});
The following example shows how Airbridge receives the product list data. The totalQuantity will be automatically calculated by adding up all product quantity values.
{
"totalQuantity": 5, // Total quantity of items are automatically summed
"cartID": "73926365",
"products": [
{
"quantity": 3,
"productID": "1",
"price": 1500,
"name": "MacBook Pro",
"currency": "USD",
"position": 1
},
{
"quantity": 2,
"productID": "2",
"price": 1500,
"name": "MacBook Air",
"currency": "USD",
"position": 2
}
]
}
Custom Attributes can be configured by Airbridge users to collect additional event details that reflect the nature of business and marketing objectives.
Note that all data collected as Custom Attributes can be viewed in raw data exports under a single column. For instance, let's say you configured Custom Attributes to collect the user's ranking and item type. Then, both the ranking and item type data will appear under the same column.
All data collected as Custom Attributes appear under a single column.
//Example code for customAttributes
airbridge.events.send("purchase_card", {
"customAttributes": {
"userRank": "1",
"itemType": "sword"
}
})
#import <AirBridge/ABInAppEvent.h>
ABInAppEvent* event = [[ABInAppEvent alloc] init];
[event setCategory:@"purchase_card"];
NSDictionary* customs = @{
@"userRank": @"1",
@"itemType": @"sword"
};
[event setCustoms:customs];
[event send];
let event = ABInAppEvent()
event?.setCategory("purchase_card")
let customs : [String: Any] = [
"userRank": "1",
"itemType": "sword"
]
event?.setCustoms(customs)
event?.send()
Map<String, Object> customAttributes = new HashMap<>();
customAttributes.put("userRank", "1");
customAttributes.put("itemType", "sword");
Airbridge.trackEvent(
"purchase_card", // Category
null, // Action
null, // Label
null, // Value
customAttributes, // Custom Attributes
null, // Semantic Attributes
);
Airbridge.trackEvent(
category = "purchase_card",
customAttributes = mapOf(
"userRank" to "1",
"itemType" to "sword"
)
)
Data collected as Attributes is subject to the following limitations:
The data will not be collected in case of a Semantic Attribute data type mismatch. However, the data with the correct data type and the other event properties will still be collected.
The event will not be collected in case of a Custom Attribute data type mismatch. Keep in mind that the data types of Custom Attributes may vary.
Data collected as Semantic Attributes will be truncated to the maximum length, which is 1,024 characters for string data and 64 bits for integer or float data.
When the data collected as Custom Attributes exceeds the maximum length, ERROR_MAX_LENGTH_EXCEEDED
will be recorded instead of the actual data.
The Trigger is the point at which an event is collected. Different data could be collected depending on the data collection point. Make sure your Trigger is aligned with what you aim to measure by collecting the event.
Different data could be collected depending on how the Trigger is configured.
For instance, if you configure to collect the “Order Complete” event when the user clicks the “Buy Now” button, the event will be collected even when the payment fails.
However, if you configure to collect the "Order Complete" event when the order confirmation page is shown to the user, the event will be collected only when the payment is successful, and therefore, the event count will be more accurate.
このページは役に立ちましたか?