countlyGlobal
- Description:
Object with values passed from server to template and is available directly in the source of logged in user's dashboard generated in frontend/express/views/dashboard.html template
- Source:
Members
(static) admin_apps :object
- Description:
Object with all apps that user has admin access too, using app _id as keys and app document as value
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
id._id |
string | id of the app |
id.name |
string | name of the app |
id.country |
string | selected country of the app |
id.timezone |
string | selected country's timezone for the app (example: Europe/Riga) |
id.type |
string | app type (mobile, web, desktop, etc) |
id.created_at |
number | seconds timestamp when app was created |
id.edited_at |
number | seconds timestamp when app was last time edited |
id.owner |
string | MongoDB _id as string of the user who created this app |
id.key |
string | app key used to send SDK requests |
id.checksum_salt |
string | salt used for checksum to prevent parameter tampering |
id.last_login |
number | seconds timestamp when user last logged in |
Object with all apps that user has admin access too, using app _id as keys and app document as value
Type:
- object
Example
Example object
countlyGlobal["apps"] = {
"586e3216326a8b0a07b8d87f":{
"_id":"586e3216326a8b0a07b8d87f",
"name":"Test",
"country":"LV",
"type":"mobile",
"category":"6",
"timezone":"Europe/Riga",
"created_at":1483616790,
"edited_at":1483629279,
"owner":"586e31f61424a909e8bd9e72",
"key":"dbb1243f9c9ac891cebd63b5035a767c71b1e3d7",
"checksum_salt":""
},
"586e339a326a8b0a07b8ecb9":{
"_id":"586e339a326a8b0a07b8ecb9",
"name":"MobileApp",
"country":"FI",
"type":"mobile",
"category":"6",
"timezone":"Europe/Helsinki",
"created_at":1483617178,
"edited_at":1483617178,
"owner":"586e31f61424a909e8bd9e72",
"key":"b8fa15b9125dd54f534593639d3814b0a24e8c13"
}
};
(static) apps :object
- Description:
Object of all apps that user has access to using app _id string as key and app document from MongoDB as value
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
id._id |
string | id of the app |
id.name |
string | name of the app |
id.country |
string | selected country of the app |
id.timezone |
string | selected country's timezone for the app (example: Europe/Riga) |
id.type |
string | app type (mobile, web, desktop, etc) |
id.created_at |
number | seconds timestamp when app was created |
id.edited_at |
number | seconds timestamp when app was last time edited |
id.owner |
string | MongoDB _id as string of the user who created this app |
id.key |
string | app key used to send SDK requests |
id.checksum_salt |
string | salt used for checksum to prevent parameter tampering |
id.last_login |
number | seconds timestamp when user last logged in |
Object of all apps that user has access to using app _id string as key and app document from MongoDB as value
Type:
- object
Example
Example object
countlyGlobal["apps"] = {
"586e3216326a8b0a07b8d87f":{
"_id":"586e3216326a8b0a07b8d87f",
"name":"Test",
"country":"LV",
"type":"mobile",
"category":"6",
"timezone":"Europe/Riga",
"created_at":1483616790,
"edited_at":1483629279,
"owner":"586e31f61424a909e8bd9e72",
"key":"dbb1243f9c9ac891cebd63b5035a767c71b1e3d7",
"checksum_salt":""
},
"586e339a326a8b0a07b8ecb9":{
"_id":"586e339a326a8b0a07b8ecb9",
"name":"MobileApp",
"country":"FI",
"type":"mobile",
"category":"6",
"timezone":"Europe/Helsinki",
"created_at":1483617178,
"edited_at":1483617178,
"owner":"586e31f61424a909e8bd9e72",
"key":"b8fa15b9125dd54f534593639d3814b0a24e8c13"
}
};
(static) cdn :string
- Description:
String of host of cdn which you can prefix user serverd files like app icons with
- Source:
String of host of cdn which you can prefix user serverd files like app icons with
Type:
- string
(static) config :object
- Description:
Frontend configuration from serverside shared configs
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
production |
boolean | if true minimized and combined files are served, else separate unminimized files are served |
theme |
string | current theme or empty if no theme, default is empty |
session_timeout |
number | number of minutes when session should timeout or 0 if disabled |
use_google |
boolean | should use google services like vizualization api or disable all related functionality |
code |
boolean | if true, will display links to integration guide in Management -> Apps section |
Frontend configuration from serverside shared configs
Type:
- object
Example
Example object
countlyGlobal["config"] = {
"production":false,
"theme":"",
"session_timeout":0,
"use_google":true,
"code":true
};
(static) countlyTitle :string
- Description:
Countly instance title to be used as page name
- Source:
Countly instance title to be used as page name
Type:
- string
Example
countlyGlobal["countlyTitle"] = "Countly";
(static) csrf_token :string
- Description:
CSRF token to be used on requests to the app.js server
- Source:
CSRF token to be used on requests to the app.js server
Type:
- string
Example
countlyGlobal["csrf_token"] = "yvzAHjnM-t5LxZAAyAVYLooRvrzEss9aQ89Y";
(static) defaultApp :object
- Description:
Object with data of default app, which should be used if user does not have any app selected
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
_id |
string | id of the app |
name |
string | name of the app |
country |
string | selected country of the app |
timezone |
string | selected country's timezone for the app (example: Europe/Riga) |
type |
string | app type (mobile, web, desktop, etc) |
created_at |
number | seconds timestamp when app was created |
edited_at |
number | seconds timestamp when app was last time edited |
owner |
string | MongoDB _id as string of the user who created this app |
key |
string | app key used to send SDK requests |
checksum_salt |
string | salt used for checksum to prevent parameter tampering |
last_login |
number | seconds timestamp when user last logged in |
Object with data of default app, which should be used if user does not have any app selected
Type:
- object
Example
Example object
countlyGlobal["defaultApp"] = {
"_id":"586e3216326a8b0a07b8d87f",
"name":"Test",
"country":"LV",
"type":"mobile",
"category":"6",
"timezone":"Europe/Riga",
"created_at":1483616790,
"edited_at":1483629279,
"owner":"586e31f61424a909e8bd9e72",
"key":"dbb1243f9c9ac891cebd63b5035a767c71b1e3d7",
"checksum_salt":""
};
(static) member :object
- Description:
Object containing all information about current user
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
_id |
MongoObjectId | id of the member document in MongoDB |
full_name |
string | full name of the user |
username |
string | username of the user |
email |
string | email address of the user |
global_admin |
boolean | true if user is global admin and has access to everything |
created_at |
number | seconds timestamp when user was created |
password_changed |
number | seconds timestamp when last time user has changed the password |
lang |
string | user's selected localization of dashboard, short version, as "en" |
api_key |
string | user's api key to use in ajax requests to server on user's behalf |
last_login |
number | seconds timestamp when user last logged in |
Object containing all information about current user
Type:
- object
Example
Example object
countlyGlobal["member"] = {
"_id":{"_bsontype":"ObjectID", "id":{"type":"Buffer","data":[88,110,49,246,20,36,169,9,232,189,158,114]}},
"full_name":"test",
"username":"test",
"email":"test",
"global_admin":true,
"created_at":1483616758,
"password_changed":1483616758,
"lang":"en",
"api_key":"1fd3ef9c94e3218934792e097afa836a",
"last_login":1484911071
};
(static) path :string
- Description:
String of directory path if Countly is configured to run in subdirectory
- Source:
String of directory path if Countly is configured to run in subdirectory
Type:
- string
(static) plugins :array
- Description:
Array with all enabled plugin names
- Source:
Array with all enabled plugin names
Type:
- array
Examples
Example object
countlyGlobal["plugins"] = ["mobile", "web", "desktop", "plugins", "density", "locale", "browser", "sources", "views"];
Checking if plugin is enabled
if(countlyGlobal.plugins.indexOf("myplugin") !== -1){
//my plugin is enabled
}
(static) security :object
- Description:
Security configuration from serverside shared configs
- Source:
Security configuration from serverside shared configs
Type:
- object
Example
Example object
countlyGlobal["security"] = {
"login_tries":3,
"login_wait":300,
"password_min":4,
"password_char":false,
"password_number":false,
"password_symbol":false,
"password_expiration":0,
"dashboard_additional_headers":"X-Frame-Options:deny\nX-XSS-Protection:1; mode=block\nStrict-Transport-Security:max-age=31536000 ; includeSubDomains",
"api_additional_headers":"X-Frame-Options:deny\nX-XSS-Protection:1; mode=block"
};