Basic Analytics Objects and Events

The Brytelytics API includes a base set of functions that are always available, no matter which packages are loaded.

The Brytelytics API includes a base set of functions that are always available, no matter which packages are loaded. These are cross-industry, common behaviors supported by the API.

The API uses the concept of JSON Schemas extensively. For more information about how JSON Schemas work, and how to validate your data against a schema, visit json-schema.org.

Analytics Package

The majority of Brytelytics API events and related objects are defined in the Analytics Schema. These events handle all common activity a user performs on a app or website, such as authentication and page/screen views.

https://cdn.brytecore.com/packages/analytics/schema.json

https://github.com/Brytecore/brytescore-api-core-packages/blob/master/analytics/schema.json

Core Functions

There are three core functions unrelated to event tracking, devMode, load and setAPIKey. These are the only functions not validated by a JSON schema.

devMode

Runs the library in local development mode. No data will be sent to the Brytelytics API. Each time the brytescore function is called, it will log the data object to your console. You can copy and paste this object into a JSON validator to catch syntax errors.

FieldTypeRequiredDescription
enabledbooleanYes

Set to true to enable devMode. To disable devMode (default), omit this function entirely.

This function is not available to server-side code. It's specifically a feature of the Brytecore official libraries.

1/* brytescore devMode syntax */
2
3brytescore( "devMode", true );

load

Loads a package. Brytelytics packages are encapsulations of rules, objects, and events that create business rules boundaries for the API when scoring leads and predicting user behaviors.

FieldTypeRequiredDescription
packageURLstringYes

The URL of the package to load.

This function is not necessary for server-side code. It's specifically a feature of the Brytecore official libraries.

1/* brytescore load syntax */
2
3var packageURL = "https://cdn.brytecore.com/packages/realestate/package.json";
4
5brytescore( "load", packageURL );

setAPIKey

Sets your API key. Required to track events.

FieldTypeRequiredDescription
apiKeystringYes

Your Brytelytics API key for this website or app

This is done during the initialization process.

This is done during the initialization process.

This function is not necessary for server-side code. It's specifically a feature of the Brytecore official libraries.

1/* setAPIKey syntax */
2
3brytescore( "setAPIKey", apiKey );

Basic Schemas

The Brytelytics API includes a basic set of schemas that make re-use of common objects easy. These are exposed as data types in the event schemas.

Authentication Events

The authenticated, registeredAccount and updatedUserInfo events help Brytelytics understand who your users are by providing their contact information and associated user account data. It is important to capture all of these events when they happen in your system in order to provide the lead contact information to the CRM, which in turn provides this information to your agents.

Analytics Events

System Events

System events are handled internally by the Brytelytics API client and should not be called by your code directly, unless you are writing your own API client.

No examples are given for system events. If you are using an official library, these events are handled automatically.

Updated July 25, 2026