Tracking Events

Track an event by providing an event name, customer id, and event properties. Sending events to Growlytics requires a POST request with a JSON payload specifying the event information.
Track Event API
Growlytics supports Number, BigInt, String, Boolean and Date data types for event property values. For further details refer to event tracking considerations.

API Example

Node JS
// Prepare Request input data
const moment = require('moment');
const requestBody = {
name: 'Add To Cart',
time: moment().valueOf(), // Unix EPOCH time in Milliseconds
'Product Id' : 'abcdef',
'Product Name': 'Orange BagPack',
'Quantity': 3,
'Price': 4531,
'Discount': 0,
'Brand': 'Nike',
'Category': 'BagPack'
// Call API
const request = require('request-promise');
method: 'POST',
uri: '',
headers: {
Accept: 'application/json',
'x-growlytics-key': '<GROWLYTICS-API-KEY>'
body: requestBody

Terms & Considerations

  1. 1.
    Custom Event names must be less than 50 characters.
  2. 2.
    Custom Event Attribute names are case-sensitive.
  3. 3.
    Allowed data types for event attributes:String, Number, Boolean, Date
  4. 4.
    A maximum of 50 Event Attributes allowed per custom event.
  5. 5.
    Data types of each event attributes are defined when they are tracked for the first time. For the second time, if the data type is not matching with the original data type, attributes will be ignored.