◆ constructor()
ShareUsage::constructor | ( | { interval=1200000, requestedPackageSize=10, cookie, queryWhitelist, headerBlacklist, sharePercentage=1, endpoint='https:} = {}
| ) |
inline
Constructor for ShareUsage engine.
- Parameters
-
- {object} - options settings object for share usage.
- {number} - options.interval If exactly the same evidence values are seen multiple times within this time limit (in milliseconds) then they will only be shared once.
- {number} - options.requestedPackageSize The usage element will group data into single requests before sending it. This setting controls the minimum number of entries before data is sent. If you are sharing large amounts of data, increasing this value is recommended in order to reduce the overhead of sending HTTP messages. For example, the 51Degrees cloud service uses a value of 2500.
- {string} - options.cookie if a cookie is being used to identify user sessions, it can be specified here in order to reduce the sharing of duplicated data.
- {Array} - options.queryWhitelist By default query string and HTTP form parameters are not shared unless prefixed with '51D_'. If you need to share query string parameters, a list can be specified here.
- {Array} - options.headerBlacklist By default, all HTTP headers (except a few, such as Cookies) are shared. Individual headers can be excluded from sharing by adding them to this list.
- {number} - options.sharePercentage approximate proportion of requests to be shared. 1 = 100%, 0.5 = 50%, etc..
- {string} - options.endpoint The target destination for usage sharing data. The default is https://devices-v4.51degrees.com/new.ashx.