countly.users

Follow

Users collection holds data about your mobile app or other users, their user sessions and locations, that you report using Countly SDKs.

For shorter representation, these stats are abbreviated as:

  • n - new
  • t - total
  • u - unique
  • e - events or api requests
  • d - duration
  • f - frequency
  • l - loyalty

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

_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 { "2": { "20": { "e": 7, "t": 1, "n": 1, "u": 1, "d": 60 }, "e": 7, "t": 1, "JP": { "t": 1, "n": 1, "u": 1 }, "n": 1, "u": 1, "f": { "0": 1 }, "l": { "0": 1 }, "d": 60 } }
m {year}:{month} for which data is provided 2014:10
meta Information about all country values, and frequency, loyalty and duration ranges. Note it exists only for Zero documents of each year { "f-ranges": [ "0" ], "l-ranges": [ "0" ], "countries": [ "Unknown", "JP", "GB", "US", "DE" ], "d-ranges": [ "1", "2" ] }
meta_v2 New way to store meta info, much faster writes than using sets { "f-ranges": { "0":true }, "l-ranges": { "0":true }, "countries": { "Unknown":true, "JP":true, "GB":true, "US":true, "DE":true }, "d-ranges": { "1":true, "2":true } }


Here are examples of both document types:

Zero Document Month Document
{
    "_id": "54ef785410fb8a6c23e6ef90_2015:0",
    "m": "2015:0",
    "a": "54ef785410fb8a6c23e6ef90",
    "d": {
        "2": {
            "u": 10,
            "Unknown": {
                "u": 1
            },
            "f": {
                "0": 10
            },
            "l": {
                "0": 10
            },
            "JP": {
                "u": 3
            },
            "GB": {
                "u": 2
            },
            "US": {
                "u": 3
            },
            "DE": {
                "u": 1
            },
            "ds": {
                "1": 2,
                "2": 2
            }
        },
        "u": 10,
        "w8": {
            "u": 3,
            "Unknown": {
                "u": 1
            },
            "f": {
                "0": 3
            },
            "l": {
                "0": 3
            },
            "JP": {
                "u": 1
            },
            "US": {
                "u": 1
            },
            "ds": {
                "1": 1,
                "2": 2
            }
        },
        "Unknown": {
            "u": 1
        },
        "f": {
            "0": 10
        },
        "l": {
            "0": 10
        },
        "JP": {
            "u": 3
        },
        "w5": {
            "u": 3,
            "JP": {
                "u": 1
            },
            "f": {
                "0": 3
            },
            "l": {
                "0": 3
            },
            "DE": {
                "u": 1
            },
            "GB": {
                "u": 1
            }
        },
        "w6": {
            "u": 2,
            "GB": {
                "u": 1
            },
            "f": {
                "0": 2
            },
            "l": {
                "0": 2
            },
            "JP": {
                "u": 1
            }
        },
        "GB": {
            "u": 2
        },
        "US": {
            "u": 3
        },
        "w7": {
            "u": 2,
            "US": {
                "u": 2
            },
            "f": {
                "0": 2
            },
            "l": {
                "0": 2
            },
            "ds": {
                "1": 1
            }
        },
        "DE": {
            "u": 1
        },
        "ds": {
            "1": 2,
            "2": 2
        }
    },
    "meta": {
        "f-ranges": [
            "0"
        ],
        "l-ranges": [
            "0"
        ],
        "countries": [
            "Unknown",
            "JP",
            "GB",
            "US",
            "DE"
        ],
        "d-ranges": [
            "1",
            "2"
        ]
    }
}

Looking for help?