2.0.13 • Published 3 years ago

event-api-client v2.0.13

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

node-event library to push to event-api

To install add this repository url to the packages.json file.

Data event

NameTypeDescription
categorystringEvent category
cidstringUnique client id, must be UUIDv4
actionstringEvent action e.g. 'click'
datamixedCustom data, any type. Accepts JSON object.
labelarrayEvent label e.g. Eastern campaign (if no label, use empty array [])
uidstringUserID (optional)

Google Analytics event

NameTypeDescription
categorystringEvent category
cidstringUnique client id, must be UUIDv4
actionstringEvent action e.g. 'click'
labelstringEvent label e.g. Eastern campaign (if no label, use empty string "")
valueintegerEvent value (if no value, use empty string "")
uidstringUserID (optional)

Google Analytics Pageview

NameTypeDescription
titlestringPageview category, page title
cidstringUnique client id, must be UUIDv4
hostnamestringHostname from which content was hosted
pagestringPage path name, must start with '/'
uidstringUserID (optional)

Example

event.data("category", "UUIDv4", "action", {"data":"random"}, ["label1", "label2"], "UserID");
event.ga("category", "UUIDv4", "action", "label", "value", "UserID");
event.pageview("title", "UUIDv4", "hostname.com", "/page", "UserID");

Config parameters in Client-API config

NameTypeDescription
api.endpointstringEvent-API endpoint, ending '/'
intervalnumberInterval between retries
poolnumberMaximum amount of requests in queue
requestsnumberMaximum amount of requests worked paraller
retriesnumberHow many times to retry sending queue

Example

"nodeEvent": {
    "api": {
        "endpoint": "https://localhost:8000/"
    },
    "interval": 3,
    "pool": 1000,
    "requests": 1024,
    "retries": 3
}
2.0.13

3 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

7 years ago

2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago