Type Definitions
Event
Countly custom event object
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string | name or id of the event | ||
count |
number |
<optional> |
1 | how many times did event occur |
sum |
number |
<optional> |
sum to report with event (if any) | |
dur |
number |
<optional> |
duration to report with event (if any) | |
segmentation |
Object |
<optional> |
object with segments key /values |
- Source:
Init
Countly initialization object
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
app_key |
string | app key for your app created in Countly | ||
device_id |
string | to identify a visitor, will be auto generated if not provided | ||
url |
string |
<optional> |
https://cloud.count.ly | your Countly server url, you can use your own server URL or IP here |
app_version |
string |
<optional> |
0.0 | the version of your app or website |
country_code |
string |
<optional> |
country code for your visitor | |
city |
string |
<optional> |
name of the city of your visitor | |
ip_address |
string |
<optional> |
ip address of your visitor | |
debug |
boolean |
<optional> |
false | output debug info into console |
interval |
number |
<optional> |
500 | set an interval how often to check if there is any data to report and report it in miliseconds |
queue_sizel |
number |
<optional> |
1000 | maximum amount of queued requests to store |
fail_timeout |
number |
<optional> |
60 | set time in seconds to wait after failed connection to server in seconds |
metrics |
Metrics | provide Metrics for this user/device, or else will try to collect what's possible |
- Source:
Metrics
Countly metrics object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
_os |
string | name of platform/operating system |
_os_version |
string | version of platform/operating system |
_device |
string | device name |
_resolution |
string | screen resolution of the device |
_carrier |
string | carrier or operator used for connection |
_density |
string | screen density of the device |
_locale |
string | locale or language of the device in ISO format |
_store |
string | source from where the user/device/installation came from |
- Source:
UserDetails
Countly user information object
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string |
<optional> |
user's full name |
username |
string |
<optional> |
user's username or nickname |
email |
string |
<optional> |
user's email address |
organization |
string |
<optional> |
user's organization or company |
phone |
string |
<optional> |
user's phone number |
picture |
string |
<optional> |
url to user's picture |
gender |
string |
<optional> |
M value for male and F value for femail |
byear |
number |
<optional> |
user's birth year used to calculate current age |
custom |
Object |
<optional> |
object with custom key value properties you want to save with user |
- Source: