Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Client Examples

Mark Libucha edited this page Jun 4, 2017 · 11 revisions

The Code

Full client code for JavaScript and Java.

The Configuration

Object Description Notes
{ "batchSize": 1, "requests": {"",[]}} Send all events, with all attributes, as they arrive. 0 1 2 3
{ "batchSize": 10, "maxSecs": 30, "requests": {"",[]}} Send all events, with all attributes, in batches of 10, or after 30 seconds expires since the last batch if there are less than 10. 0 1 2
{"requests": {"Ad":["count"]}} Send all Ad events, but include only the count attribute. 0 3 4
{"requests": {"Ad":["count"],"Search":["term","lat","lon"]}} Send all Ad events, but include only the count attribute, and all Search events, but only include term, lat and lon attributes 0 3 4
{"requests": {"Ad":["count"],"":[]}} Send all Ad events, but include only the count attribute, and all attributes for all other events. 0 3 4
{"requests": {"Ad":["count"]} "filters": [{"name":".*", "attribute":"sessionid", "value":"123"}]} Send all Ad events with sessionid 1234, but include only the count attribute. 0 3 4

0: multicast ip and port are required but left out for brevity.
1: Empty string as a request key signifies all event names.
2: Empty array as a request value signifies all event attributes.
3: maxSecs defaults to 60.
4: batchSize defaults to 100.

Clone this wiki locally