countly.events_data

New data model collection

This collection is from the new data model, which combines all events from all apps in a single collection.

The countly.events_data collection represents a significant shift in how event data is stored and managed. Previously, we maintained a separate collection for each app or event type. Now, with this new model, all events across different apps are stored in a single, consolidated collection.

To facilitate this transition, two new fields have been introduced:

  • a - This field indicates the app from which the event originates, allowing us to easily identify the source.
  • e - This field represents the event key, helping categorize and define the specific type of event being tracked.

Additionally, the ID is also formatted. It now includes the appID at the beginning.

Here is the list of possible fields:

FieldDescriptionExample
aApp ID as a string to show to which app event belongs to65d7054adc29cbb9a3b9418f
eEvent key, to show which event the document describesLogin
_idID formed by {appID}+eventHASH+ {segment}{year}:0 or {segment}{year}:{month} or no-segment_{year}:0_{shardname} or {segment}{year}:{month}{shardname}65d7054adc29cbb9a3b9418f_aac7f78428c06c63d11fc58922aba19463cf6123_no-segment_2014:0
dData 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 provided2014:10
metaInformation 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_v2New 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": "65d7054adc29cbb9a3b9418f_aac7f78428c06c63d11fc58922aba19463cf6123_no-segment_2014:0",
    "a": "65d7054adc29cbb9a3b9418f",   
    "e": "Login",
    "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"
}
Was this page helpful?
Reach out to us for any other questions.
Helpful?

Looking for more Help?