NotifyVisitors offers an API for tracking events once you integrate your platforms through the SDK, it begins tracking the events. These are called system events. NV tracks user interactions with your apps and campaigns.

Apart from the system events, you can create custom events to track the other interactions of the users which are vital for your business. These created custom events are defined by the event attributes such as the price of the product, quantity, category, etc. Such type of data is used to engage customers via personalized campaigns across all engagement channels.

DIFFERENT API ENDPOINTS FOR TRACKING EVENTS

NotifyVisitors provides different API endpoints for tracking the custom and system events.

Upload events to create or update users

  • This endpoint enables you to create or update events. You can upload a maximum of 1000 users at a single API.
    https://analytics.notifyvisitors.com/api/v1/event/create

Getting users data that perform an event

  • In this API, you will get a list of user profiles. You only have to specify the event name, date range, and batch size.
    https://analytics.notifyvisitors.com/api/v1/event/get

Get total no. of profiles that meet an event query

  • This endpoint is used to get the total number of profiles that meet an event query.
    https://analytics.notifyvisitors.com/api/v1/event/count

Track events with respective dates

  • This endpoint is used to track events.
    https://analytics.notifyvisitors.com/api/v1/event/track

API RATE LIMIT

  • The API rate limit is the number of times the API can be requested per minute.
  • You can make up to 500 API requests per minute on an API.
  • If the limit exceeds, the app will throw an error in Response. All API requests are
    subject to rate limits.

Points to Remember

  • The name of the custom events must be less than 50 characters.

  • The names of the custom events are case sensitive. The string attribute values of the custom events must be less than 1000 characters.

  • Event attributes have the following data types: String, Number, Boolean, Date,JSON Array,JSON object. Remember that JSON objects can contain only one of these data types.

  • In case, the event attribute value is in a JSON object, it cannot be used to create segments. You can only use it to create personalized campaigns.

  • The data types must have consistent values that you can save against the attribute. If the data type is changed in the future, the custom event attribute data will not flow steadily in the NV dashboard.

PARAMETERTYPEDESCRIPTIONMANDATORY
userIdStringEither one of userId or anonymousId is mandatory.No
anonymousIdStringEither one of userId or anonymousId is mandatory. In case both IDs are sent, anonymousId will be ignored.No
eventNameStringName of the eventNo
eventTimeStringDate and time when the event occurred in ISO format: yyyy-MM-ddTHH:mm:ss±hhmmNo
eventDataStringEvent attributes as key-value pairs. For example
{ "Product ID": 1337, "Category": "PERFUMES" }
These data types are allowed for custom attributes: String, Number, Boolean, Date, JSON Array, JSON Object. JSON Object can contain one of these data types.
No
genderStringGender of the user.
Can be one of male, female or other.
No
emailStringEmail address of the user.No
emailOptInBooleanEmail subscription preference of the user.
Users who are opted out of this will not receive any communication over email. Users are by default opted in to email.
No
phoneStringPhone number of the user.
phone must be in E.164 format, eg. +551155256325, +917850009678
No
smsOptInBooleanSMS subscription preference for the user. Users who are opted out of this will not receive any communication over SMS. Users are by default opted in to SMS.No
companyStringName of the company for which the user works.No
hashedEmailStringEncrypted email address for use with a private Email Service Provider..No
hashedPhoneStringEncrypted phone number for use with a private SMS Service ProviderNo
attributesObjectCustom attributes of the user as key-value pairs or arrays. For example:
{ "isPaidUser": true, "userPlan": "Premium" }
These data types are allowed for custom attributes: String, Number, Boolean, Date, JSON Object. JSON Object can contain one of these data types.
No

RETURNS:

While you call an API for receiving and sending data to track the custom events, you can be shown the below response. The status can be shown as queued, error, or success.

{
    "response": {
        "status": "queued"
    }
}

ERRORS :

If you do not pass the necessary information in the event attributes, then an error message will be displayed :

{
  "response": {
  "message":"Error: userId and anonymousId cannot be empty.",
  "status":"error"
    }
}