countly.devices

Follow

Collection devices contains break down of new, total and unique devices provided in the metrics by time periods.

For shorter representation, these stats are abbreviated as:

  • n - new
  • t - total
  • u - unique

There are 4 types of documents available:

  1. Zero document, which id is formed from {appID}_{year}:0 And it contains stats breakdown by months and weeks for the specified year
  2. Month document, which id is formed from {appID}_{year}:{month} And it contains stats breakdown by days of the month
  3. Splitted zero document which id is formed from {appID}{year}:0{shardname}
  4. Splitted month document which id is formed from {appID}{year}:{month}{shardname}

Here is the list of possible fields

Field Description Example
_id ID formed as {appID}{year}:0 or {appID}{year}:{month} or {appID}{year}:0{shardname} or {appID}{year}:{month}{shardname} 542e95d747f0be510c000004_2014:10
a App ID 542e95d747f0be510c000004
d Data for specific document "14": { "Nexus 5": { "t": 1, "u": 1 }, "Samsung": { "t": 1, "u": 1 }, "Sony Ericsson": { "t": 1, "u": 1 }, "iPad": { "t": 1, "u": 1 } }
m {year}:{month} for which data is provided 2014:10
meta Information about all devices values. Note it exists only for Zero documents of each year { "devices": [ "Nexus 5", "Sony Ericsson", "iPad", "Samsung", "iPad 4", "One Touch Idol X", "iPad Air", "Nexus 7", "Galaxy Note", "Optimus L5", "Fire Phone", "Windows Phone", "Xperia Z", "iPhone Mini", "Kindle Fire HDX", "iPhone 5", "iPhone 6", "Nexus 10", "One S", "iPhone 5C", "iPhone 4S", "Nexus 4", "Lumia 920" ] }
meta_v2 New way to store meta info, much faster writes than using sets { "devices": { "Nexus 5":true, "Sony Ericsson":true, "iPad":true, "Samsung":true, "iPad 4":true } }


Here are examples of both document types:

Zero document Month document
{
    "_id": "542e95d747f0be510c000004_2014:0",
    "a": "542e95d747f0be510c000004",
    "d": {
        "10": {
            "Fire Phone": {
                "u": 15
            },
            "Galaxy Note": {
                "u": 20
            },
            "Kindle Fire HDX": {
                "u": 17
            },
            "Lumia 920": {
                "u": 10
            },
            "Nexus 10": {
                "u": 9
            },
            "Nexus 4": {
                "u": 23
            },
            "Nexus 5": {
                "u": 24
            },
            "Nexus 7": {
                "u": 11
            },
            "One S": {
                "u": 18
            },
            "One Touch Idol X": {
                "u": 26
            },
            "Optimus L5": {
                "u": 15
            },
            "Samsung": {
                "u": 1
            },
            "Sony Ericsson": {
                "u": 1
            },
            "Windows Phone": {
                "u": 18
            },
            "Xperia Z": {
                "u": 16
            },
            "iPad": {
                "u": 1
            },
            "iPad 4": {
                "u": 15
            },
            "iPad Air": {
                "u": 20
            },
            "iPhone 4S": {
                "u": 25
            },
            "iPhone 5": {
                "u": 22
            },
            "iPhone 5C": {
                "u": 13
            },
            "iPhone 6": {
                "u": 7
            },
            "iPhone Mini": {
                "u": 16
            }
        },
        "Fire Phone": {
            "u": 15
        },
        "Galaxy Note": {
            "u": 20
        },
        "Kindle Fire HDX": {
            "u": 17
        },
        "Lumia 920": {
            "u": 10
        },
        "Nexus 10": {
            "u": 9
        },
        "Nexus 4": {
            "u": 23
        },
        "Nexus 5": {
            "u": 24
        },
        "Nexus 7": {
            "u": 11
        },
        "One S": {
            "u": 18
        },
        "One Touch Idol X": {
            "u": 26
        },
        "Optimus L5": {
            "u": 15
        },
        "Samsung": {
            "u": 1
        },
        "Sony Ericsson": {
            "u": 1
        },
        "Windows Phone": {
            "u": 18
        },
        "Xperia Z": {
            "u": 16
        },
        "iPad": {
            "u": 1
        },
        "iPad 4": {
            "u": 15
        },
        "iPad Air": {
            "u": 20
        },
        "iPhone 4S": {
            "u": 25
        },
        "iPhone 5": {
            "u": 22
        },
        "iPhone 5C": {
            "u": 13
        },
        "iPhone 6": {
            "u": 7
        },
        "iPhone Mini": {
            "u": 16
        },
        "w41": {
            "Nexus 5": {
                "u": 1
            },
            "Samsung": {
                "u": 1
            },
            "Sony Ericsson": {
                "u": 1
            },
            "iPad": {
                "u": 1
            }
        },
        "w42": {
            "Fire Phone": {
                "u": 15
            },
            "Galaxy Note": {
                "u": 20
            },
            "Kindle Fire HDX": {
                "u": 17
            },
            "Lumia 920": {
                "u": 10
            },
            "Nexus 10": {
                "u": 9
            },
            "Nexus 4": {
                "u": 23
            },
            "Nexus 5": {
                "u": 23
            },
            "Nexus 7": {
                "u": 11
            },
            "One S": {
                "u": 18
            },
            "One Touch Idol X": {
                "u": 26
            },
            "Optimus L5": {
                "u": 15
            },
            "Windows Phone": {
                "u": 18
            },
            "Xperia Z": {
                "u": 16
            },
            "iPad 4": {
                "u": 15
            },
            "iPad Air": {
                "u": 20
            },
            "iPhone 4S": {
                "u": 25
            },
            "iPhone 5": {
                "u": 22
            },
            "iPhone 5C": {
                "u": 13
            },
            "iPhone 6": {
                "u": 7
            },
            "iPhone Mini": {
                "u": 16
            }
        }
    },
    "m": "2014:0",
    "meta": {
        "devices": [
            "Nexus 5",
            "Sony Ericsson",
            "iPad",
            "Samsung",
            "iPad 4",
            "One Touch Idol X",
            "iPad Air",
            "Nexus 7",
            "Galaxy Note",
            "Optimus L5",
            "Fire Phone",
            "Windows Phone",
            "Xperia Z",
            "iPhone Mini",
            "Kindle Fire HDX",
            "iPhone 5",
            "iPhone 6",
            "Nexus 10",
            "One S",
            "iPhone 5C",
            "iPhone 4S",
            "Nexus 4",
            "Lumia 920"
        ]
    }
}

Looking for help?