Event Properties

    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.

    Event Properties Overview

    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

     

    Event Category

    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.

    Rules and limitations for Event Category

    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.. For special characters, only underscore (_) is allowed. 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.

    View data by 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.

     

    Event Action and Event Label

    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.

    Rules and limitations for Event Action and Event Label

    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.

    View data by Event Action and 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.

     

    Event Value

    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.

    Understanding Event Value

    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

    airbridge.ecommerce.order.completed

    1,000

    100

    10,000

    airbridge.ecommerce.order.completed

    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.

    Limitations for Event Value

    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.

      

    Attributes

    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

    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

    currency

    The 3-letter currency code of the standard currency set in Airbridge

    Product List

    array

    products

    The list of products; Refer to this example

    Product ID

    string

    products.$0.productID

    The ID of the first product in the product list

    Product Name

    string

    products.$0.name

    The name of the first product in the product list

    Product Price

    float

    products.$0.price

    The price of the first product in the product list; Negative numbers are supported for refunds and exchanges

    Product Quantity

    int

    products.$0.quantity

    The quantity of the first product in the product list

    Product Currency

    string

    products.$0.currency

    The 3-letter currency code for the price of the first product in the product list

    Product Position

    int

    products.$0.position

    The placement of the first product in the product list

    Product Category ID

    string

    products.$0.categoryID

    The ID of the product category that includes the first product in the product list

    Product Category Name

    string

    products.$0.categoryName

    The name of the product category that includes the first product in the product list

    Product Brand ID

    string

    products.$0.brandID

    The ID of the brand of the first product in the product list

    Product Brand Name

    string

    products.$0.brandName

    The name of the brand of the first product in the product list

    Period

    string

    period

    The duration in ISO 8601 format

    Example values: P7D, P1M, P6M, P1Y

    Is Renewal Event

    boolean

    isRenewal

    The renewal status

    Renewal Count

    int

    renewalCount

    The number of renewals

    Product List ID

    string

    productListID

    The product list ID

    Cart ID

    string

    cartID

    The cart ID

    Transaction ID

    string

    transactionID

    The transaction ID

    Transaction Type

    string

    transactionType

    The type of transaction, following the convention set by each Airbridge user; Cancelled transactions are always recorded as “cancel”

    Transaction Paired Event Category

    string

    transactionPairedEventCategory

    The Event Category of the transaction-related event; Event details are available in case of the “Order Cancel” event

    Transaction Paired Event Timestamp

    int

    transactionPairedEventTimestamp

    The time of occurrence of the transaction-related event in a 13-digit timestamp in milliseconds

    Total Quantity

    int

    totalQuantity

    The total quantity; The sum of the product quantities is automatically collected even when the total quantity is not defined

    Search Query

    string

    query

    The query requested by the user

    In App Purchased

    boolean

    inAppPurchased

    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

    contributionMargin

    Contribution margin, or the revenue left after covering the variable costs, in the standard currency set in Airbridge; Not calculated by Airbridge

    List ID

    string

    listID

    The list ID

    Rate ID

    string

    rateID

    The rate ID

    Rate

    float

    rate

    The rating

    Max Rate

    float

    maxRate

    The highest rating

    Achievement ID

    string

    achievementID

    The achievement ID

    Shared Channel

    string

    sharedChannel

    The shared channel

    Date Time

    string

    datetime

    The date and time in ISO-8601 format

    Description

    string

    description

    The description

    Is Revenue Event

    boolean

    isRevenue

    Whether or not it is a revenue-related event

    - true: Is a revenue-related event

    - false: Is not a revenue-related event

    Place

    string

    place

    The place

    Schedule ID

    string

    scheduleID

    The schedule ID

    Type

    string

    type

    The type

    Level

    string

    level

    The level

    Score

    float

    score

    The score

    Android SDK (v4)

    1234567891011121314151617181920212223
    Airbridge.trackEvent(
    	"purchase_card",
    	mapOf(
    		AirbridgeAttribute.TRANSACTION_ID to "1458132a-0d09-4944-a686-fcbee81b74f7",
    		AirbridgeAttribute.PRODUCTS to listOf(
    			mapOf(
    				AirbridgeAttribute.PRODUCT_ID to "1234",
    				AirbridgeAttribute.PRODUCT_NAME to "Nike 1",
    				AirbridgeAttribute.PRODUCT_PRICE to 55,
    				AirbridgeAttribute.PRODUCT_CURRENCY to "USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY to 1,
    			),
    			mapOf(
    				AirbridgeAttribute.PRODUCT_ID to "1235",
    				AirbridgeAttribute.PRODUCT_NAME to "Nike 2",
    				AirbridgeAttribute.PRODUCT_PRICE to 44,
    				AirbridgeAttribute.PRODUCT_CURRENCY to "USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY to 1,
    			),
    		),
    		AirbridgeAttribute.CURRENCY to "USD",
    	)
    )
    1234567891011121314151617181920212223
    Airbridge.trackEvent(
    	"purchase_card",
    	new HashMap() {{
    		put(AirbridgeAttribute.TRANSACTION_ID, "1458132a-0d09-4944-a686-fcbee81b74f7");
    		put(AirbridgeAttribute.PRODUCTS, Arrays.asList(
    			new HashMap() {{
    				put(AirbridgeAttribute.PRODUCT_ID, "1234");
    				put(AirbridgeAttribute.PRODUCT_NAME, "Nike 1");
    				put(AirbridgeAttribute.PRODUCT_PRICE, 55);
    				put(AirbridgeAttribute.PRODUCT_CURRENCY, "USD");
    				put(AirbridgeAttribute.PRODUCT_QUANTITY, 1);
    			}},
    			new HashMap() {{
    				put(AirbridgeAttribute.PRODUCT_ID, "1235");
    				put(AirbridgeAttribute.PRODUCT_NAME, "Nike 2");
    				put(AirbridgeAttribute.PRODUCT_PRICE, 44);
    				put(AirbridgeAttribute.PRODUCT_CURRENCY, "USD");
    				put(AirbridgeAttribute.PRODUCT_QUANTITY, 1);
    			}}
    		));
    		put(AirbridgeAttribute.CURRENCY, "USD");
    	}}
    );

    Android SDK (Previous)

    1234567891011121314151617181920212223
    Airbridge.trackEvent(
    	category = "purchase_card",
    	semanticAttributes = mapOf(
    		SemanticAttributes.KEY_TRANSACTION_ID to "1458132a-0d09-4944-a686-fcbee81b74f7",
    		SemanticAttributes.KEY_PRODUCTS to listOf(
    			mapOf(
    				Product.KEY_ID to "1234",
    				Product.KEY_NAME to "Nike 1",
    				Product.KEY_PRICE to 55,
    				Product.KEY_CURRENCY to "USD",
    				Product.KEY_QUANTITY to 1
    			),
    			mapOf(
    				Product.KEY_ID to "1235",
    				Product.KEY_NAME to "Nike 2",
    				Product.KEY_PRICE to 44,
    				Product.KEY_CURRENCY to "USD",
    				Product.KEY_QUANTITY to 1
    			)
    		),
    		SemanticAttributes.KEY_CURRENCY to "USD"
    	)
    )
    12345678910111213141516171819202122232425262728293031
    Map<String, Object> product1 = new HashMap<>();
    product1.put(Product.KEY_ID, "1234");
    product1.put(Product.KEY_NAME, "Nike 1");
    product1.put(Product.KEY_PRICE, 55);
    product1.put(Product.KEY_CURRENCY, "USD");
    product1.put(Product.KEY_QUANTITY, 1);
    
    Map<String, Object> product2 = new HashMap<>();
    product2.put(Product.KEY_ID, "1235");
    product2.put(Product.KEY_NAME, "Nike 2");
    product2.put(Product.KEY_PRICE, 44);
    product2.put(Product.KEY_CURRENCY, "USD");
    product2.put(Product.KEY_QUANTITY, 1);
    
    List<Map<String, Object>> products = new ArrayList<>();
    products.add(product1);
    products.add(product2);
    
    Map<String, Object> semanticAttributes = new HashMap<>();
    semanticAttributes.put(SemanticAttributes.KEY_TRANSACTION_ID, "1458132a-0d09-4944-a686-fcbee81b74f7");
    semanticAttributes.put(SemanticAttributes.KEY_PRODUCTS, products);
    semanticAttributes.put(SemanticAttributes.KEY_CURRENCY, "USD");
    
    Airbridge.trackEvent(
        "purchase_card", // Category
        null, // Action
        null, // Label
        null, // Value
        null, // Custom Attributes
        semanticAttributes // Semantic Attributes
    );

    iOS SDK (v4)

    1234567891011121314151617181920212223
    Airbridge.trackEvent(
    	category: "purchase_card",
    	semanticAttributes: [
    		AirbridgeAttribute.TRANSACTION_ID: "1458132a-0d09-4944-a686-fcbee81b74f7",
    		AirbridgeAttribute.PRODUCTS: [
    			[
    				AirbridgeAttribute.PRODUCT_ID: "1234",
    				AirbridgeAttribute.PRODUCT_NAME: "Nike 1",
    				AirbridgeAttribute.PRODUCT_PRICE: 55,
    				AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY: 1,
    			],
    			[
    				AirbridgeAttribute.PRODUCT_ID: "1235",
    				AirbridgeAttribute.PRODUCT_NAME: "Nike 2",
    				AirbridgeAttribute.PRODUCT_PRICE: 44,
    				AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY: 1,
    			],
    		],
    		AirbridgeAttribute.CURRENCY: "USD",
    	]
    )
    123456789101112131415161718192021
    [Airbridge trackEventWithCategory:@"purchase_card"
    	semanticAttributes:@{
    		AirbridgeAttribute.TRANSACTION_ID : @"1458132a-0d09-4944-a686-fcbee81b74f7",
    		AirbridgeAttribute.PRODUCTS : @[
    			@{
    				AirbridgeAttribute.PRODUCT_ID : @"1234",
    				AirbridgeAttribute.PRODUCT_NAME : @"Nike 1",
    				AirbridgeAttribute.PRODUCT_PRICE : @(55),
    				AirbridgeAttribute.PRODUCT_CURRENCY : @"USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY : @(1),
    			},
    			@{
    				AirbridgeAttribute.PRODUCT_ID : @"1235",
    				AirbridgeAttribute.PRODUCT_NAME : @"Nike 2",
    				AirbridgeAttribute.PRODUCT_PRICE : @(44),
    				AirbridgeAttribute.PRODUCT_CURRENCY : @"USD",
    				AirbridgeAttribute.PRODUCT_QUANTITY : @(1),
    			},
    		],
    		AirbridgeAttribute.CURRENCY : @"USD",
    }];

    iOS SDK (Previous)

    123456789101112131415161718192021222324252627
    let event = ABInAppEvent()
    
    event?.setCategory("purchase_card")
    
    let semantics: [String: Any] = [
    	ABSemanticsKey.transactionID: "1458132a-0d09-4944-a686-fcbee81b74f7",
    	ABSemanticsKey.products: [
    		[
    			ABProductKey.productID: "1234",
    			ABProductKey.name: "Nike 1",
    			ABProductKey.price: 55,
    			ABProductKey.currency: "USD",
    			ABProductKey.quantity: 1,
    		],
    		[
    			ABProductKey.productID: "1235",
    			ABProductKey.name: "Nike 2",
    			ABProductKey.price: 44,
    			ABProductKey.currency: "USD",
    			ABProductKey.quantity: 1,
    		],
    	],
    	ABSemanticsKey.currency: "USD",
    ]
    event?.setSemantics(semantics)
    
    event?.send()
    123456789101112131415161718192021222324
    ABInAppEvent* event = [[ABInAppEvent alloc] init];
        
    [event setCategory:@"purchase_card"];
        
    NSDictionary* semantics = @{
    	ABSemanticsKey.transactionID: @"1458132a-0d09-4944-a686-fcbee81b74f7",
    	ABSemanticsKey.products: @[@{
    			ABProductKey.productID: @"1234",
    			ABProductKey.name: @"Nike 1",
    			ABProductKey.price: @(55),
    			ABProductKey.currency: @"USD",
    			ABProductKey.quantity: @(1),
    		}, @{
    			ABProductKey.productID: @"1235",
    			ABProductKey.name: @"Nike 2",
    			ABProductKey.price: @(44),
    			ABProductKey.currency: @"USD",
    			ABProductKey.quantity: @(1),
    	}],
    	ABSemanticsKey.currency: @"USD"
    };
    [event setSemantics:semantics];
        
    [event send];

    12345678910111213141516171819
    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
        }],
        currency: "USD"
      }
    });

    Custom Attributes

    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.

    Android SDK (v4)

    1234567
    Airbridge.trackEvent(
        category = "purchase_card",
        customAttributes = mapOf(
            "userRank" to "1",
            "itemType" to "sword"
        )
    )
    12345678
    Airbridge.trackEvent(
        "purchase_card",    // Category
        null,               // Semantic Attributes
        new HashMap() {{    // Custom Attributes
            put("userRank", "1");
            put("itemType", "sword");
        }}
    );

    Android SDK (Previous)

    1234567
    Airbridge.trackEvent(
        category = "purchase_card",
        customAttributes = mapOf(
            "userRank" to "1",
            "itemType" to "sword"
        )
    )
    123456789101112
    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
    );

    iOS SDK (v4)

    12345678
    Airbridge.trackEvent(
        category: "purchase_card",
        semanticAttributes: [:],
        customAttributes: [
            "userRank": "1",
            "itemType": "sword",
        ]
    )
    1234
    [Airbridge
        trackEventWithCategory:@"purchase_card"
        semanticAttributes:@{}
        customAttributes:@{@"userRank" : @"1", @"itemType" : @"sword"}];

    iOS SDK (Previous)

    1234567891011
    let event = ABInAppEvent()
    
    event?.setCategory("purchase_card")
    
    let customs: [String: Any] = [
        "userRank": "1",
        "itemType": "sword",
    ]
    event?.setCustoms(customs)
    
    event?.send()
    1234567
    ABInAppEvent *event = [[ABInAppEvent alloc] init];
    
    [event setCategory:@"purchase_card"];
    NSDictionary *customs = @{@"userRank" : @"1", @"itemType" : @"sword"};
    [event setCustoms:customs];
    
    [event send];

    123456
    airbridge.events.send("purchase_card", {
      "customAttributes": {
        "userRank": "1",
        "itemType": "sword"
      }
    })

    Limitations for Attributes

    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 of 2,048 characters, ERROR_MAX_LENGTH_EXCEEDED will be recorded instead of the actual data.

    Trigger

    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.

    このページは役に立ちましたか?

    ご質問やご提案はありますか?