countly.events{ID}

This is an old collection and will not be used from Countly 24.10 onward.

There are multiple events{ID} collections, one collection for each specific event

Collection name is formed using events string and sha1 hash from event key with app ID.

So for example for event with key "Buy" for app ID "542e95d747f0be510c000004" the collection name would be: "events" + sha1("Buy542e95d747f0be510c000004") and could look like: "events1c6413ce64eba0dbdcd6c103493309095bcf12ef"

These collections contain break down count of event instances by time periods.

For shorter representation, these stats are abbreviated as:

  • c - count of total event instances for specific period

There are four types of documents available:

  1. Zero document, which id is formed from "no-segment_{year}:0" And it contains stats breakdown by months and weeks for the specified year
  2. Month document, which id is formed from "{segmention}{year}:{month}" or "no-segment{year}:{month}" in case event does not have any segments. And it contains stats breakdown by days of the month
  3. Split zero document which id is formed from no-segment_{year}:0_{shardname}
  4. Split month document which id is formed from {segment}{year}:{month}{shardname}

Here is the list of possible fields

Field Description Example
_id ID formed by {segment}{year}:0 or {segment}{year}:{month} or no-segment_{year}:0_{shardname} or {segment}{year}:{month}{shardname} 542e95d747f0be510c000004_2014:10
d Data for specific document "1": { "0": { "c": 1 }, "1": { "c": 1 }, "2": { "c": 4 }, "3": { "c": 1 }, "5": { "c": 1 }, "6": { "c": 1 }, "8": { "c": 2 }, "11": { "c": 1 }, "12": { "c": 3 }, "13": { "c": 3 }, "14": { "c": 5 }, "16": { "c": 2 }, "17": { "c": 3 }, "18": { "c": 2 }, "20": { "c": 1 }, "21": { "c": 3 }, "22": { "c": 1 }, "23": { "c": 2 }, "c": 37 },
m {year}:{month} for which data is provided 2014:10
meta Information about all event's segments and their values. Note it exists only for Zero documents of each year { "difficulty": [ "medium", "easy", "hard" ], "level": [ "[CLY]7", "[CLY]8", "[CLY]3", "[CLY]4", "[CLY]5", "[CLY]11", "[CLY]2", "[CLY]10", "[CLY]1", "[CLY]6", "[CLY]9" ], "mode": [ "physics", "story", "arcade" ], "segments": [ "level", "mode", "difficulty" ] }
meta_v2 New way to store meta info, much faster writes than using sets { "difficulty": { "medium":true, "easy":true, "hard":true }, "level": { "[CLY]7":true, "[CLY]8":true, "[CLY]3":true, "[CLY]4":true ], "mode": { "physics":true, "story":true, "arcade":true }, "segments": { "level":true, "mode":true, "difficulty":true } }


Here are examples for both document types:

Zero document Month document No-segment
{
    "_id": "no-segment_2014:0",
    "m": "2014:0",
    "meta": {
        "difficulty": [
            "medium",
            "easy",
            "hard"
        ],
        "level": [
            "[CLY]7",
            "[CLY]8",
            "[CLY]3",
            "[CLY]4",
            "[CLY]5",
            "[CLY]11",
            "[CLY]2",
            "[CLY]10",
            "[CLY]1",
            "[CLY]6",
            "[CLY]9"
        ],
        "mode": [
            "physics",
            "story",
            "arcade"
        ],
        "segments": [
            "level",
            "mode",
            "difficulty"
        ]
    },
    "s": "no-segment"
}

Looking for help?