User login telemetry info

Hello folks ,

Do we have user login telemetry data e.g the frequency of logins and duration of each login (time out - time in to calculate minutes used). i have been looking into this doc but have gotten that data yet . Below is the code sample i have extracted from the server .

{
	"_id": "telemetry-2022-3-9-medic-67fc6e2e-46b9-4924-84c3-5371a13b202d",
	"_rev": "1-36539f3c0d68795fa41b854cbe24e41f",
	"type": "telemetry",
	"dbInfo": {
		"host": "https://cht.openelis-global.org/medic/",
		"other": {
			"data_size": 107258674
		},
		"sizes": {
			"file": 108447352,
			"active": 107229587,
			"external": 107258674
		},
		"adapter": "https",
		"cluster": {
			"n": 1,
			"q": 8,
			"r": 1,
			"w": 1
		},
		"db_name": "medic",
		"data_size": 107229587,
		"disk_size": 108447352,
		"doc_count": 109,
		"purge_seq": "0-g1AAAAFTeJzLYWBg4MhgTmEQTM4vTc5ISXIwNDLXMwBCwxygFFMeC5BkaABS____n5-VyEBQ7QOI2v_EqD0AUXufGLULIGr341eblAAkk-oJ2p_kAFIXT1idAkidPUF1iQxJ8hBFWQD9XV6O",
		"update_seq": "394-g1AAAAFTeJzLYWBg4MhgTmEQTM4vTc5ISXIwNDLXMwBCwxygFFMiQ5L8____sxJV8ChKUgCSSfZgdaL41DmA1MWD1fHgU5cAUlcPVqeDR10eC5BkaABSQKXzsxLNCapdAFG7H79_IGoPQNTez0q0Iaj2AUQt0L1NWQD7omAY",
		"doc_del_count": 7,
		"auto_compaction": false,
		"compact_running": false,
		"disk_format_version": 7,
		"instance_start_time": "0"
	},
	"device": {
		"screen": {
			"width": 1280,
			"height": 680
		},
		"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
		"deviceInfo": {},
		"hardwareConcurrency": 2
	},
	"metrics": {
		"boot_time": {
			"max": 168.29999999701977,
			"min": 168.29999999701977,
			"sum": 168.29999999701977,
			"count": 1,
			"sumsqr": 28324.889998996852
		},
		"tasks:refresh": {
			"max": 6,
			"min": 6,
			"sum": 6,
			"count": 1,
			"sumsqr": 36
		},
		"search:reports": {
			"max": 89.59999999403954,
			"min": 58.20000000298023,
			"sum": 287.09999999403954,
			"count": 4,
			"sumsqr": 21141.449998801945
		},
		"geolocation:failure:1": {
			"max": 1,
			"min": 1,
			"sum": 2,
			"count": 2,
			"sumsqr": 2
		},
		"search:contacts:types": {
			"max": 65.5,
			"min": 36.70000000298023,
			"sum": 249.6000000089407,
			"count": 5,
			"sumsqr": 13136.080001003742
		},
		"analytics:targets:load": {
			"max": 4,
			"min": 4,
			"sum": 4,
			"count": 1,
			"sumsqr": 16
		},
		"boot_time:2:to_bootstrap": {
			"max": 7,
			"min": 7,
			"sum": 7,
			"count": 1,
			"sumsqr": 49
		},
		"search:reports:subjectIds": {
			"max": 129.6000000089407,
			"min": 37.5,
			"sum": 1256.4000000208616,
			"count": 21,
			"sumsqr": 84752.92000211953
		},
		"user_settings:language:en": {
			"max": 1,
			"min": 1,
			"sum": 1,
			"count": 1,
			"sumsqr": 1
		},
		"boot_time:purging:undefined": {
			"max": 1,
			"min": 1,
			"sum": 1,
			"count": 1,
			"sumsqr": 1
		},
		"enketo:contacts:care:add:render": {
			"max": 370,
			"min": 343,
			"sum": 713,
			"count": 2,
			"sumsqr": 254549
		},
		"boot_time:3:to_angular_bootstrap": {
			"max": 37.5,
			"min": 37.5,
			"sum": 37.5,
			"count": 1,
			"sumsqr": 1406.25
		},
		"boot_time:purging_meta:undefined": {
			"max": 1,
			"min": 1,
			"sum": 1,
			"count": 1,
			"sumsqr": 1
		},
		"boot_time:1:to_first_code_execution": {
			"max": 123.79999999701977,
			"min": 123.79999999701977,
			"sum": 123.79999999701977,
			"count": 1,
			"sumsqr": 15326.439999262095
		}
	},
	"metadata": {
		"day": 9,
		"user": "medic",
		"year": 2022,
		"month": 3,
		"deviceId": "67fc6e2e-46b9-4924-84c3-5371a13b202d",
		"versions": {
			"app": "3.14.0",
			"forms": {
				"srq": "2-6f7397facb2ecbafe16a371929d7f733",
				"care": "2-c06663e4caa70ff238ef3a64347bfda2",
				"delivery": "2-adf37c0da7d5e58c8e4d27fc940f70e6",
				"pregnancy": "2-4fa3db96cae638c4cb041125c9970496",
				"treatment": "2-6458979fcdac75529b96605a10755a0d",
				"death_report": "2-97cfa3cc24ee743dfea03c019d644bec",
				"undo_death_report": "2-3a4ca8d678f0338d7044cb1bc35d103d",
				"contact:clinic:edit": "2-c1c955042db963a95470bdf891bcef6f",
				"contact:person:edit": "2-a5b769f3a462172bed6ef4f2227beb41",
				"pregnancy_home_visit": "2-283eb323e61a7fc756bda61f9d9be382",
				"contact:clinic:create": "2-757396242984ec5ea69e4b2a10571db8",
				"contact:person:create": "2-230d39c41682da720b83e4909b138c9b",
				"pregnancy_danger_sign": "2-49758bfd894fb5db6e719bff864f9da9",
				"contact:health_center:edit": "2-19b3da5f9f146be07ec1854a372e374b",
				"contact:health_center:create": "2-c9b86820479f211c8e505eba150c5203",
				"contact:district_hospital:edit": "2-4360bb0eb6f6ff863849a07adac7e851",
				"pnc_danger_sign_follow_up_baby": "2-12e8989f6774828bb10aa4b675bc43ff",
				"pregnancy_danger_sign_follow_up": "2-a9a2b6800d6f93e151a3a63359620976",
				"contact:district_hospital:create": "2-42b8b579b38ca6c2978c238e7d9c78fe",
				"pnc_danger_sign_follow_up_mother": "2-62f58b6e0ade10d70f15df73ddb6a025",
				"pregnancy_facility_visit_reminder": "2-0e3deaf22966166d05bcf803615499c8"
			},
			"settings": "13-57b1baaf34bcf8dabcd005f4ba0ecc68"
		}
	}
}

Hi @cliff

I’m not sure what you mean by “login”. Do you mean for how long the app was open? or actually when the user has logged out and in?
I don’t believe we have any telemetry info around actually logging in or out.

Thanks!

thanks @diana , i mean the number of times the user logged in and out ,also the duration for which they stayed logged in before logging out

oh i see :+1: ,thanks

hello @diana

  • Can you set it so users login once per day?
  • If set to one day, can we test how login data appears in the telemetry payload? Is it possible to count total logins?

cc @Beth

Hi @cliff

Can you set it so users login once per day?

The way that you may be able to achieve this is to lower the CouchDB cookie expiry time. This is where you can find more information about CouchDB Cookie settings: 3.6. Authentication and Authorization — Apache CouchDB® 3.2 Documentation

Please note that logouts due to session expiry is something that we invest a lot to prevent, because most of our users don’t know their login credentials. So even with a lower cookie timeout, depending on user activity, you might not get every user to get logged out every day.

Is it possible to count total logins?

Without a specific telemetry entry for logging in, it’s not possible to accurately count logins.

1 Like

thanks @diana for the feedback