Object Reference

Each object in the API may be given an identifier and will typically be addressable through a URL.

Event Object

The Event object is how you record any actions your users perform, along with any metadata that describe the action. For further elaboration on events check Understand your players' events.

Metadata are extra pieces of information you can tie to events you track. They can be none or anything that will be useful while analyzing the events later. We recommend sending properties whenever possible because they give you a more complete picture of what your users are doing. Every Metadata can be a number, a string or an array of values.

Event and Metadata example:

Event Name

Key

Value

buy

product_id

a123456

price

30

product_category

fashion

product_tags

men & new_collection

"buy": {
  "product_id": "a123456",
  "price": 30,
  "product_category": "fashion"
  "product_tags": ["men", "new_collection"]
}

The following example shows a collection of events

"events": {
    "buy": {
      "category": "Electronics",
      "amount": 300
    },
    "travel": {
      "destinations": ["Paris", "Cairo"],
      "tickets": 4,
      "season": "Winter"
    },
    "visit_branch": {}
}

PlayerAttribute Object

The Event object how you record any actions your users perform, along with any metadata that describe the action.

"playerAttributes": {
    "displayName": "John Doe",
    "email": "example@example.com",
    "mobileNumber": "011111111111",
    "gender": "M",
    "dateOfBirth": "2019-09-19",
    "joinDate": "2019-09-19",
    "custom": {
      "key1": "value1",
      "key2": 180,
      "key3": "2019-09-19",
      "key4": true //boolean values (true or false)
      "key5": "value5",
    }
}

Parameters Description

Parameter

Description

Examples

Type

displayName

Player's display name

String

email

Email address of the player

example@example.com

String

gender

Gender: M or F

M

String

mobileNumber

Mobile number with country code

0018320000000

Number

dateOfBirth

Player's birth date

YYYY-MM-DD

Date

joinDate

Date at which the player joined

YYYY-MM-DD

Date

custom

Customized data for players added by the client

Object

Last updated