active-users

Querying Google Analytics API for 30-day active users

泪湿孤枕 提交于 2020-01-02 20:59:16
问题 I'm having trouble getting data on 30-day active users when I query Google Analytics in python. My code is below. My problem is that I need to specify a date or day as dimension. "At least one of ga:nthDay, ga:date, or ga:day must be specified as a dimension to query this metric." I'm just not sure what the proper syntax is for this. from oauth2client.service_account import ServiceAccountCredentials from apiclient.discovery import build import httplib2 #create service credentials #this is

Querying Google Analytics API for 30-day active users

≡放荡痞女 提交于 2019-12-06 15:16:09
I'm having trouble getting data on 30-day active users when I query Google Analytics in python. My code is below. My problem is that I need to specify a date or day as dimension. "At least one of ga:nthDay, ga:date, or ga:day must be specified as a dimension to query this metric." I'm just not sure what the proper syntax is for this. from oauth2client.service_account import ServiceAccountCredentials from apiclient.discovery import build import httplib2 #create service credentials #this is where you'll need your json key #replace "keys/key.json" with the path to your own json key key_file

How can you get the active users connected to a postgreSQL database via SQL?

◇◆丶佛笑我妖孽 提交于 2019-11-30 06:12:03
问题 How can you get the active users connected to a postgreSQL database via SQL? This could be the userid's or number of users. 回答1: (question) Don't you get that info in select * from pg_user; or using the view pg_stat_activity: select * from pg_stat_activity; Added: the view says: One row per server process, showing database OID, database name, process ID, user OID, user name , current query, query's waiting status, time at which the current query began execution, time at which the process was

How can you get the active users connected to a postgreSQL database via SQL?

人走茶凉 提交于 2019-11-28 15:27:26
How can you get the active users connected to a postgreSQL database via SQL? This could be the userid's or number of users. balexandre (question) Don't you get that info in select * from pg_user ; or using the view pg_stat_activity : select * from pg_stat_activity; Added: the view says: One row per server process, showing database OID, database name, process ID, user OID, user name , current query, query's waiting status, time at which the current query began execution, time at which the process was started, and client's address and port number . The columns that report data on the current