API Authentication
To authenticate API requests to the ALE Metrics API, you must request a authentication token by sending a POST request. To send the request to retrieve the authentication token, the token request must have a JSON body containing the following:
Authentication Token Request
POST Endpoint: https://ale.bytebrew.io/auth/generatetoken
{
"email": "myemail@something.com",
"apiKey": "SOMEAPIKEYYOUHAVE"
}
Authentication Token Response
The authenication token request will return a response containing the "token" to use when requesting data from the ALE API. See an example "token" response:
{
"token": "AEVENLONGERSCRAMBLEOFASCIICHARACTERSGIVENBYTIMTHEMAGICIAN"
}
Every request for API data must have an Authentication Header. See an example Authentication Header below:
Authorization: Bearer AEVENLONGERSCRAMBLEOFASCIICHARACTERSGIVENBYTIMTHEMAGICIAN
User Data
Using this endpoint in the ALE API, you can get high level cohort data about your users in your games.
User Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/userdata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/userdata?startDate=2021-03-01
Response:
{
"data": [
{
"Users": 249
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/userdata?startDate=2021-05-15&endDate=2021-06-20&breakdown=date,device
Response:
{
"data": [
{
"Users": 10,
"Date": "2021-06-08",
"Device": "SM-A102U"
},
{
"Users": 34,
"Date": "2021-06-08",
"Device": "iPhone12,3"
},
{
"Users": 12,
"Date": "2021-05-19",
"Device": "iPhone11,2"
},
{
"Users": 22,
"Date": "2021-06-01",
"Device": "iPhone11,8"
},
{
"Users": 5,
"Date": "2021-06-01",
"Device": "iPhone8,2"
}
]
}
Session Data
Using this endpoint in the ALE API, you can get high level cohort data about the sessions in your games.
Session Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessions
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessions?startDate=2023-03-01
Response:
{
"data": [
{
"Sessions": 1034
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessions?startDate=2023-06-01&breakdown=date,device&endDate=2023-06-14
Response:
{
"data": [
{
"Sessions": 1,
"Date": "2023-06-02",
"Device": "Redmi Note 8"
},
{
"Sessions": 1,
"Date": "2023-06-01",
"Device": "SM-M225FV"
},
{
"Sessions": 1,
"Date": "2023-06-01",
"Device": "SM-A125F"
},
{
"Sessions": 3,
"Date": "2023-06-07",
"Device": "Redmi Note 8 Pro"
}
]
}
Session Length Data
Using this endpoint in the ALE API, you can get high level cohort data about the session lengths in your games.
Session Length Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessionlength
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessionlength?startDate=2023-03-01
Response:
{
"data": [
{
"SessionTime": 573.34
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/sessionlength?startDate=2023-06-01&breakdown=date,device&endDate=2023-06-14
Response:
{
"data": [
{
"SessionTime": 76,
"Date": "2023-06-06",
"Device": "SM-A326U"
},
{
"SessionTime": 8,
"Date": "2023-06-04",
"Device": "SM-G960U"
},
{
"SessionTime": 42.5,
"Date": "2023-06-08",
"Device": "SM-A705MN"
},
{
"SessionTime": 66,
"Date": "2023-06-11",
"Device": "SM-A225M"
},
{
"SessionTime": 31,
"Date": "2023-06-06",
"Device": "SM-A035M"
}
]
}
Playtime Data
Using this endpoint in the ALE API, you can get high level cohort data about the playtime in your games.
Playtime Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/playtime
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/playtime?startDate=2023-03-01
Response:
{
"data": [
{
"Playtime": 1542
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/playtime?startDate=2023-06-01&breakdown=date,device&endDate=2023-06-14
Response:
{
"data": [
{
"Playtime": 253,
"Date": "2023-06-01",
"Device": "SM-M225FV"
},
{
"Playtime": 260.5,
"Date": "2023-06-03",
"Device": "SM-A127F"
},
{
"Playtime": 21,
"Date": "2023-06-07",
"Device": "SM-A705MN"
},
{
"Playtime": 49,
"Date": "2023-06-01",
"Device": "SM-A515F"
},
{
"Playtime": 478,
"Date": "2023-06-01",
"Device": "SM-A035M"
}
]
}
Retention Data
Using this endpoint in the ALE API, you can get high level cohort data about the number of users in your games that retain.
Retention Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/retention
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/retention?startDate=2023-06-01
Response:
{
"data": [
{
"created_date": "2023-06-01",
"day_0": 18,
"day_1": 3,
"day_2": 2,
"day_3": 0,
"day_4": 1,
"day_5": 0,
"day_6": 0,
"day_7": 0
},
{
"created_date": "2023-06-02",
"day_0": 15,
"day_1": 0,
"day_2": 0,
"day_3": 2,
"day_4": 2,
"day_5": 1,
"day_6": 1,
"day_7": 0
},
{
"created_date": "2023-06-03",
"day_0": 17,
"day_1": 1,
"day_2": 1,
"day_3": 1,
"day_4": 1,
"day_5": 0,
"day_6": 0,
"day_7": 0
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/retention?startDate=2023-06-01&breakdown=country&endDate=2023-06-14
Response:
{
"data": [
{
"created_date": "2023-06-01",
"Country": "PH",
"day_0": 4,
"day_1": 0,
"day_2": 0,
"day_3": 0,
"day_4": 0,
"day_5": 0,
"day_6": 0,
"day_7": 0
},
{
"created_date": "2023-06-01",
"Country": "TR",
"day_0": 1,
"day_1": 0,
"day_2": 0,
"day_3": 0,
"day_4": 0,
"day_5": 0,
"day_6": 0,
"day_7": 0
},
{
"created_date": "2023-06-01",
"Country": "US",
"day_0": 1,
"day_1": 0,
"day_2": 0,
"day_3": 0,
"day_4": 0,
"day_5": 0,
"day_6": 0,
"day_7": 0
},
{
"created_date": "2023-06-01",
"Country": "AE",
"day_0": 1,
"day_1": 0,
"day_2": 0,
"day_3": 0,
"day_4": 0,
"day_5": 0,
"day_6": 0,
"day_7": 0
}
]
}
DAU Data
Using this endpoint in the ALE API, you can get high level cohort data about the number of DAU in your games.
DAU Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/dau
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/dau?startDate=2023-06-01
Response:
{
"data": [
{
"DAU": 30
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/dau?startDate=2023-06-01&breakdown=country,date&endDate=2023-06-14
Response:
{
"data": [
{
"DAU": 9,
"Country": "IN",
"Date": "2023-06-03"
},
{
"DAU": 1,
"Country": "PH",
"Date": "2023-06-13"
},
{
"DAU": 1,
"Country": "ET",
"Date": "2023-06-09"
},
{
"DAU": 5,
"Country": "BD",
"Date": "2023-06-05"
},
{
"DAU": 1,
"Country": "BE",
"Date": "2023-06-09"
},
{
"DAU": 1,
"Country": "ID",
"Date": "2023-06-12"
},
{
"DAU": 1,
"Country": "UA",
"Date": "2023-06-01"
},
{
"DAU": 1,
"Country": "LB",
"Date": "2023-06-05"
}
]
}
Progression Data
Using this endpoint in the ALE API, you can get high level cohort data about your user's progression data in your games.
Progression Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/progressiondata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/progressiondata?startDate=2021-03-01
Response:
{
"data": [
{
"Events": 11889
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/progressiondata?startDate=2021-05-15&endDate=2021-06-20&breakdown=date,progressiontype,environment
Response:
{
"data": [
{
"Events": 2,
"Date": "2021-06-03",
"ProgressionType": "Started",
"Environment": "Main"
},
{
"Events": 118,
"Date": "2021-06-03",
"ProgressionType": "Completed",
"Environment": "Levels"
},
{
"Events": 35,
"Date": "2021-05-18",
"ProgressionType": "Started",
"Environment": "Levels"
},
{
"Events": 37,
"Date": "2021-06-05",
"ProgressionType": "Failed",
"Environment": "Levels"
},
{
"Events": 63,
"Date": "2021-06-05",
"ProgressionType": "Completed",
"Environment": "Levels"
},
...
]
}
Monetization Revenue Data
Using this endpoint in the ALE API, you can get high level cohort data about your game's revenue broken down by ad revenue and purchase revenue.
Monetization Revenue Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationrevenue
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationrevenue?startDate=2021-03-01
Response:
{
"data": {
"purchaseData": [
{
"Revenue": 432.68
}
],
"monetizationData": [
{
"Revenue": 255.20
}
]
}
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationrevenue?startDate=2021-05-01&endDate=2021-06-20&breakdown=date,country
Response:
{
"data": {
"purchaseData": [
{
"Revenue": 24.28,
"Date": "2021-05-26",
"Country": "US"
}
],
"monetizationData": [
{
"Revenue": 10.059822,
"Date": "2021-06-23",
"Country": "US"
},
{
"Revenue": 12.11,
"Date": "2021-05-01",
"Country": "BR"
},
{
"Revenue": 11.270238,
"Date": "2021-05-13",
"Country": "US"
},
...
]
}
}
Monetization Purchase Data
Using this endpoint in the ALE API, you can get high level cohort data about your games' purchase revenue.
Monetization Purchase Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationpurchasedata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationpurchasedata?startDate=2021-03-01
Response:
{
"data": [
{
"Purchases": 11,
"Revenue": 47.39
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationrevenue?startDate=2021-05-01&endDate=2021-06-20&breakdown=item,country
Response:
{
"data": [
{
"Purchases": 1,
"Revenue": 4.99,
"Item": "gold_pack2",
"Country": "US"
}
]
}
Purchasing Users Data
Using this endpoint in the ALE API, you can get high level cohort data about your games' unique purchasing users.
Monetization Purchasing Users Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/purchasingusersdata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/purchasingusersdata?startDate=2023-03-01
Response:
{
"data": [
{
"PurchasingUsers": 11
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/purchasingusersdata?startDate=2023-05-01&endDate=2023-06-20&breakdown=date,country
Response:
{
"data": [
{
"PurchasingUsers": 3,
"Date": "2023-05-04",
"Country": "US"
},
{
"PurchasingUsers": 1,
"Date": "2023-05-16",
"Country": "US"
},
{
"PurchasingUsers": 2,
"Date": "2023-05-15",
"Country": "US"
}
]
}
Monetization Ad Revenue Data
Using this endpoint in the ALE API, you can get high level cohort data about your games' ad revenue.
Monetization Ad Revenue Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationadsdata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationadsedata?startDate=2021-03-01
Response:
{
"data": [
{
"fillRate": 0.72,
"impressions": 7825,
"ecpm": 18.7708,
"revenue": 146.87
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/monetizationadsedata?startDate=2021-05-01&endDate=2021-06-20&breakdown=network,adtype
Response:
{
"data": [
{
"fillRate": 0.5263157894736843,
"impressions": 0,
"ecpm": 0,
"revenue": 0,
"Network": "Unity Ads",
"AdType": "rewarded"
},
{
"fillRate": 0.9368611397942536,
"impressions": 98,
"ecpm": 0.10928868055555555,
"revenue": 0.020487,
"Network": "Chartboost",
"AdType": "rewarded"
},
{
"fillRate": 0.29438577815626993,
"impressions": 0,
"ecpm": 0,
"revenue": 0,
"Network": "Unity Ads",
"AdType": "interstitial"
},
{
"fillRate": 0.8797688924194946,
"impressions": 0,
"ecpm": 0,
"revenue": 0,
"Network": "Chartboost",
"AdType": "interstitial"
},
{
"fillRate": 1,
"impressions": 4,
"ecpm": 0.1586748409090909,
"revenue": 0.006980999999999999,
"Network": "AdMob Network",
"AdType": "interstitial"
}
]
}
Custom Event Data
Using this endpoint in the ALE API, you can get high level cohort data about your custom events in your games.
Custom Event Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/customeventdata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/customeventdata?startDate=2021-03-01&aggregator=count
Response:
{
"data": [
{
"Count": 3760
}
]
}
Example Query #2
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/customeventdata?startDate=2021-05-01&endDate=2021-06-20&aggregator=count&breakdown=event
Response:
{
"data": [
{
"Count": 421,
"Event": "VCPurchase"
},
{
"Count": 140,
"Event": "EquippedNewItem"
},
{
"Count": 760,
"Event": "VFX_OFF"
},
{
"Count": 320,
"Event": "MUSIC_ON"
}
]
}
Event Breakdown Data
Using this endpoint in the ALE API, you can get granular level data about your custom events in your game.
Event Breakdown Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/eventbreakdowndata
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
[{"param": "SUB_PARAMETER", "operator": "AVG" | "MEDIAN" | "SUM" | "MIN" | "MAX"}]
Example Aggregate array:
[{"param": "level", "operator": "AVG"}]
{ "SUB_PARAMETER": { "operator": "=" | "!=" | ">=" | ">" | "<" | "<=", "value": "VALUE" } }
Example Sub-Param Filter:
{ "level": { "operator": "=", "value": "5" }, "character": { "operator": "=", "value": "Viking" } }
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/eventbreakdowndata?startDate=2024-04-01&typeEvent=level_completed&eventBreakdowns=PowerUp
Response:
{
"data": [
{
"eventAmount": 200,
"userAmount": 43,
"Event": "level_completed",
"PowerUp": "Roundhouse"
},
{
"eventAmount": 65,
"userAmount": 14,
"Event": "level_completed",
"PowerUp": "ElbowCombo"
},
{
"eventAmount": 55,
"userAmount": 12,
"Event": "level_completed",
"PowerUp": "GutShot"
},
{
"eventAmount": 21,
"userAmount": 3,
"Event": "level_completed",
"PowerUp": "Slammer"
}
]
}
Example Query #2
Aggregators: [{"param": "level", "operator": "AVG"}]
Encoded Aggregators: %5B%7B%22param%22%3A%20%22level%22%2C%20%22operator%22%3A%20%22AVG%22%7D%5D
Sub-Param Filter: {"WorldMap": {"operator": "=", "value": "1"}}
Encoded Sub-Param Filter: %7B%22WorldMap%22%3A%20%7B%22operator%22%3A%20%22%3D%22%2C%20%22value%22%3A%20%221%22%7D%7D
GET Endpoint: https://ale.bytebrew.io/api/gamedata/analytics/eventbreakdowndata?startDate=2024-04-01&endDate=2024-04-20&typeEvent=level_won&eventBreakdowns=PowerUp,WorldMap,country,buildversion&subParamFilter=%7B%22WorldMap%22%3A%20%7B%22operator%22%3A%20%22%3D%22%2C%20%22value%22%3A%20%221%22%7D%7D&aggregators=%5B%7B%22param%22%3A%20%22level%22%2C%20%22operator%22%3A%20%22AVG%22%7D%5D
Response:
{
"data": [
{
"eventAmount": 19,
"userAmount": 4,
"Event": "level_won",
"PowerUp": "Roundhouse",
"WorldMap": "1",
"Country": "US",
"BuildVersion": "0.1.7",
"level_AVG": 5.2105263157894735
},
{
"eventAmount": 14,
"userAmount": 4,
"Event": "level_won",
"PowerUp": "Roundhouse",
"WorldMap": "1",
"Country": "PK",
"BuildVersion": "0.1.7",
"level_AVG": 4.5
},
{
"eventAmount": 12,
"userAmount": 4,
"Event": "level_won",
"PowerUp": "Roundhouse",
"WorldMap": "1",
"Country": "IN",
"BuildVersion": "0.1.7",
"level_AVG": 2.75
}
]
}
AB Test Data
Using this endpoint in the ALE API, you can get high level details about your games AB Test. More specifically you can use this to retrieve the specfic ab test filter keys to use against the other metric API endpoints.
AB Test Data Endpoint
GET Endpoint: https://ale.bytebrew.io/api/gamedata/abtests
Attach Parameters
To define the data you want to request using the this endpoint, you can utilize the following parameters in your query:
Example Query #1
GET Endpoint: https://ale.bytebrew.io/api/gamedata/abtests
Response:
{
"results": [
{
"gameID": gameID1,
"abName": "My AB Test 1",
"abKey": "abtest_1",
"filterKeys": [
"abtest_1:Control Group",
"abtest_1:Group A",
"abtest_1:Group B",
]
},
{
"gameID": gameID2,
"abName": "Cool AB Test",
"abKey": "cool_abtest",
"filterKeys": [
"cool_abtest:Control Group",
"cool_abtest:Group A",
"cool_abtest:Group B",
]
}
]
}
Breaking Down By Game
Using the game breakdown value, expect a response with an additional field "metadata" that is alongside "data".
Breaking Down By Game Response Example
Response:
{
"data": [
{
"Users": 421,
"Game": "GameID1"
},
{
"Users": 140,
"Event": "GameID2"
}
],
"metadata": {
"games": [
{
"gameID": "gameID1",
"platform": "Android",
"bundleID": "com.example.gameID1"
},
{
"gameID": "gameID2",
"platform": "iOS",
"bundleID": "com.example.gameID2"
}
]
}
}
Need some help?
Join the ByteBrew Discord community to chat with our team and other developers on the platform.