api/parts/data/usage

This module processes main session and user information

Source:

Methods

(static) getPredefinedMetrics(params, userProps) → {array}

Source:

Gets metrics to collect from plugins

Parameters:
Name Type Description
params params

params object

userProps object

object where to populate with user properties to set to user document

Returns:

collected metrics

Type
array

(static) processSessionDuration(params, callback)

Source:

Process session_duration calls

Parameters:
Name Type Description
params params

params object

callback function

callback when done

(static) returnAllProcessedMetrics(params) → {object}

Source:

Process all metrics and return

Parameters:
Name Type Description
params params

params object

Returns:

params

Type
object

(static) setLocation(params) → {Promise}

Source:

Set Location information in params but donot update it in users document

Parameters:
Name Type Description
params params

params object

Returns:

promise which resolves upon completeing processing

Type
Promise

(static) setUserLocation(params, loc)

Source:

Set user location in params

Parameters:
Name Type Description
params params

params object

loc object

location info