Namespace: Countly

Countly

Countly object to manage the internal queue and send requests to Countly server
Source:

Namespaces

userData

Methods

(static) add_event(event)

Report custom event
Parameters:
Name Type Description
event Event Countly Event object
Source:

(static) add_log(record)

Add new line in the log of breadcrumbs of what was done did, will be included together with error report
Parameters:
Name Type Description
record string any text describing an action
Source:

(static) begin_session(noHeartBeat)

Start session
Parameters:
Name Type Description
noHeartBeat boolean true if you don't want to use internal heartbeat to manage session
Source:

(static) change_id(newId, mergeopt)

Change current user/device id
Parameters:
Name Type Attributes Description
newId string new user/device ID to use
merge boolean <optional>
move data from old ID to new ID on server
Source:

(static) end_event(event)

End timed event
Parameters:
Name Type Description
event string | Event event key if string or Countly Event object
Source:

(static) end_session(sec)

End current session
Parameters:
Name Type Description
sec int amount of seconds to report for current session, before ending it
Source:

(static) init(conf)

Initialize Countly object
Parameters:
Name Type Description
conf Init Countly initialization Init object with configuration options
Source:

(static) log_error(err, segmentsopt)

Log an exception that you catched through try and catch block and handled yourself and just want to report it to server
Parameters:
Name Type Attributes Description
err Object error exception object provided in catch block
segments string <optional>
additional key value pairs you want to provide with error report, like versions of libraries used, etc.
Source:

(static) report_conversion(campaign_id, campaign_user_idopt)

Report user conversion to the server (when user signup or made a purchase, or whatever your conversion is)
Parameters:
Name Type Attributes Description
campaign_id string id of campaign, the last part of the countly campaign link
campaign_user_id string <optional>
id of user's clicked on campaign link, if you have one
Source:

(static) request(request)

Make raw request with provided parameters
Parameters:
Name Type Description
request Object object with key/values which will be used as request parameters
Source:
Example
Countly.request({app_key:"somekey", devide_id:"someid", events:"[{'key':'val','count':1}]", begin_session:1});

(static) session_duration(sec)

Report session duration
Parameters:
Name Type Description
sec int amount of seconds to report for current session
Source:

(static) start_event(key)

Start timed event, which will fill in duration property upon ending automatically
Parameters:
Name Type Description
key string event name that will be used as key property
Source:

(static) start_time()

Start tracking duration time for this user/device, by default it is automatically if you scalled (@link begin_session)
Source:

(static) stop_time()

Stop tracking duration time for this user/device
Source:

(static) track_errors(segmentsopt)

Automatically track javascript errors that happen on the nodejs process
Parameters:
Name Type Attributes Description
segments string <optional>
additional key value pairs you want to provide with error report, like versions of libraries used, etc.
Source:

(static) track_pageview(nameopt)

Track which parts of application user visits. Alias of track_view method for compatability with Web SDK
Parameters:
Name Type Attributes Description
name string <optional>
optional name of the view
Source:

(static) track_view(nameopt)

Track which parts of application user visits
Parameters:
Name Type Attributes Description
name string <optional>
optional name of the view
Source:

(static) user_details(user)

Report custom event
Parameters:
Name Type Description
user UserDetails Countly UserDetails object
Source: