Drill plugin required
This collection might not appear if you don't have drill plugin enabled
There are multiple drill_events{ID} collections, one collection for each specific event
Collection name is formed using "drill_events" string and sha1 hash from event key with app ID.
So for example for event with key "Buy" and for app ID "542e95d747f0be510c000004" the collection name would be: "drill_events" + sha1("Buy542e95d747f0be510c000004") and could look like: "drill_events57c2b7d4eeae912495088c3754d0c6cfe9949f06"
These collections contain information about events that occurred to specific users, which you can match with countly.app_users{appID} collections documents using UserID property "uid".
Special drill events
In Countly drill, there are also some special events saved, not related to events you are sending from SDKs and they are prefixed with "[CLY]_". Good example for these kind of events are sessions.
Sessions are handled the same way as events that occurred at specific time. There was a special key reserved especially for session drill handling: "[CLY]_session".
So to access data about each specific user's sessions, you need to access countly_drill collection with name "drill_events" + sha1("[CLY]_session"+appID), where appID is your app's _id in the apps table.
Here is the list of possible fields
Field | Description | Example |
---|---|---|
_id | Unique ID of specific event for specific user generated by MongoDB | 5444e404d618f69e2a000008 |
uid | User id, documents in all countly_drill collections contain the same uid value for the same user. Can be used for data correlation among multiple events/sessions | cb51c8d13bbe95444dde6f14e802d53046eed08e |
did | Unique deviceID | de2e786f-a4b9-848c-f6af-0d0ac60ccc0d |
up | User properties in time of event. fs - First seen timestamp fs - Last seen timestamp tsd - Total session duration sc - Total session count d - Device name cty - City cc - Country code p - Platform pv - Platform version av - Application version r - Resolution | { "fs": 1413800814, "ls": 1413800814, "tsd": 120, "sc": 1, "d": "One Touch Idol X", "cty": "Unknown", "cc": "JP", "p": "WP8", "pv": "w2:2", "av": "1:1", "c": "Sprint", "r": "360x640" } |
up.dow | One of the properties that does not come from user, but rather from event time is day of the week in user time zone, where 1 is Monday and 7 is Sunday | 5 |
up.hour | One of the properties that does not come from user, but rather from event time is hour of the day in user time zone from 0 to 23 | 11 |
ts | Timestamp in miliseconds when event ocured | 1413800964000 |
cd | Creation date of the document. Used for internal TTL (Time to live) indexes of MongoDB. | ISODate("2014-10-20T11:56:42.989Z") |
d | Day of occurrence of event | 2014:10:20 |
w | Week of occurrence of event | 2014:w43 |
m | Month of occurrence of event | 2014:m10 |
h | Hour of occurrence of event | 2014:10:20:h14 |
sg | Segments provided with event | { "level": 6, "mode": "arcade", "difficulty": "hard" } |
custom | Custom user properties | { "test": "yes" } |
cmp | Campaign information | { "b": "Chrome", "c": "social5ab0c3ef92938d0e61cf77f4", "cnty": "NO", "l": "en-US", "m": "false", "pl": "Windows", "n": "Social Campaign" } |
s | Sum. Each event has an optional sum property attached to it. | 1.99 |
c | Count. Each event has a count property attached to it. | 1 |
dur | Duration. Can display how long did even run | 300 |
We also have a special collection drill_meta
containing docs that describe each drill collection. Documents in this collection show all value types (and unique values for lists) for properties that are stored in a specific drill collection.
Here is the example of both document types:
{
"uid" : "TqY",
"did" : "8897529E-B7E1-4B6E-BA00-3D8487DE2B19",
"up" : {
"fs" : 1403307938,
"ls" : 1403307938,
"tsd" : 90,
"sc" : 1,
"d" : "iPhone6,1",
"cty" : "Unknown",
"cc" : "US",
"p" : "iOS",
"pv" : "iiPhone OS 7:0:6",
"av" : "1:9:1",
"r" : "1136x640"
},
"ts" : 1403309348000,
"cd" : ISODate("2014-06-21T00:09:08.100Z"),
"d" : "2014:6:20",
"w" : "2014:w25",
"m" : "2014:m6",
"h" : "2014:6:20:h17",
"sg" : {
"Experiment_GameCenter" : 2,
"Experiment_RateMyApp" : 1,
"Experiment_RefreshNotifs" : 1,
"Experiment_DON" : 1,
"Experiment_ExpSpeed" : 0,
"Experiment_E2" : 0,
"Experiment_OfferWall" : 1,
"Experiment_WatchToEarn" : 0,
"Experiment_Ads" : 0,
"Experiment_Sales" : 1,
"totalCredits" : 5000495,
"totalCreditsBucket" : "5000000+",
"level" : 1,
"levelBucket" : "1-3",
"payerStatus" : "True",
"sessionStartTotalCredits" : 500,
"sessionStartTotalCreditsBucket" : "251-1000",
"sessionStartLevel" : 1,
"UserID" : "5ce86cdd-b93b-467e-958f-6b257ca62f28",
"sessionStartLevelBucket" : "1-3",
"installWeek" : "06/16/2014",
"sessionStartPayerStatus" : "False",
"playerTenure" : 0,
"platform" : "iOS"
},
"s" : 1.99,
"c" : 1,
"_id" : ObjectId("53a4cd246698af09366881fe")
}
{
"_id": "meta_3afa9d0525dbd975312792893f8604e9931b0cf3",
"app_id": "58650a47cc2ed563c5ad964c",
"e": "[CLY]_view",
"sg": {
"bounce": {
"type": "l",
"values": {
"0": true,
"1": true
}
},
"exit": {
"type": "l",
"values": {
"0": true,
"1": true
}
},
"name": {
"type": "l",
"values": {
"Credit Card Entry": true,
"Profile page": true,
"Start page": true,
"Settings Page": true,
"Purchase Page": true,
"Message page": true
}
},
"segment": {
"type": "l",
"values": {
"iOS": true,
"Android": true,
"Windows Phone": true
}
},
"start": {
"type": "l",
"values": {
"0": true,
"1": true
}
},
"visit": {
"type": "n"
}
},
"type": "e"
}
{
"_id": "meta_v2_src",
"com.android.browser": true,
"com.rim.marketintent": true,
"com.lenovo.leos.appstore": true,
"com.keenhi.mid.kitservice": true,
"com.google.android.feedback": true,
"com.xiaomi.market": true,
"com.miui.supermarket": true,
"com.huawei.appmarket": true,
"com.qihoo.appstore": true,
"com.moto.mobile.appstore": true,
"com.bbk.appstore": true,
"com.lenovo.leos.appstore.pad": true,
"com.appslib.vending": true,
"com.sec.android.app.samsungapps": true,
"com.baidu.appsearch": true,
"cn.goapk.market": true,
"cm.aptoide.pt": true,
"com.taobao.appcenter": true,
"com.android.vending": true,
"com.wandoujia.phoenix2": true,
"com.tencent.android.qqdownloader": true,
"com.slideme.sam.manager": true,
"com.dragon.android.pandaspace": true,
"me.onemobile.android": true,
"com.nokia.payment.iapenabler": true,
"com.oppo.market": true,
"com.aliyun.wireless.vos.appstore": true,
"com.hiapk.marketpad": true,
"com.hiapk.marketpho": true,
"com.google.vending": true,
"com.diguayouxi": true,
"com.aspire.mm": true,
"com.yingyonghui.market": true,
"com.amazon.venezia": true,
"um.market.android": true,
"com.mappn.gfan": true,
"com.nduoa.nmarket": true
}
Querying drill events by time spans
At some point you may need to query drill events by specific time spans yourself.
Drill events provide multiple properties based on the time spans you want to query.
First there is a cd attribute, which is the moment when event was processed and inserted into DB.
Then there are event time attributes as d, w, m and h, which are the dates of occurrence of the event.
d being full date as 2015:1:27, which will help when querying by days
w being a week of the year as 2015:w5, which will help when querying by weeks
m being the month of the year as 2015:m1 which will help when querying by months
h being the date with hour of the as 2015:1:27:h13 which will help when querying by hours, usually for specific date
There is also a ts attribute which contains a timestamp in milliseconds and can be used for any arbitrary time queries.
Internal events
In addition to the Events that you define, some Interval Events are also stored in Drill, depending on the enabled plugin features and functionality used.
For more information on Internal Events, see this document.