Skip to main content
Gainsight Inc.

Use Custom Event API

This article explains how to use the Custom Event API.


Gainsight PX Web SDK supports the ability to send custom events via API. Trigger an API call to create a custom event using the name for the custom event as well as properties/values for that event. 

The following data types are supported:

  • string
  • number
  • boolean
  • datetime (ISO 8601 UTC date and time)
  • nested objects that are saved as a string

Here is an example call:

// Tracking examples with event properties

aptrinsic('track', 'Video', {"name":"Welcome Video","Category":"Onboarding","Length" :5000 ,"Launched" : true , "Launched date":"2018-03-08T18:11:00Z" }); 

// Track search
aptrinsic('track', 'Search', {"terms":"profile setting how-to","results":10,"Category":"Admin"}); 


Also, in the example above the custom event includes property/values for the custom event (name, Audience size, Launched, etc), your custom event would, of course, have properties specific to your custom event. 


Custom Event properties are case insensitive. For example, the event property of name can be sent as "Name" or "name".

Custom Event Limits

Custom event limitations are imposed by the PX Events Framework on the server side.

Note: The limitations are imposed on all SDKs. The SDK itself does not impose any limitations on custom event name, number of properties/values, and the property name.

  • The custom event name has a limit of 2000 characters. 
  • The custom event has a limit of 50 properties/ values.
  • The property name/key has a limit of 1024 characters.

Note: The maximum number of Unique Custom Event names is 2000.

  • Was this article helpful?