Implementing Brytelytics at the Client Side
This guide will help you understand how to use client-side libraries for tracking real estate events with Brytelytics.
This guide will help you understand how to use client-side libraries for tracking real estate events with Brytelytics. If you want to instead use server-side tracking (recommended for websites), you can access those instructions on the Server-Side Tracking guide.
Introduction
Brytelytics is a real estate analytics service for real estate websites and mobile apps. Real estate companies use it to better understand their online consumers, if they are buyers, renters, or sellers, when and where they are looking to move, what home features they are interested in, and how close they are to needing a real estate agent.
If you are installing Brytelytics into a mobile app or client-side in a website, this guide will help you locate and install the official libraries for your chosen platform.
Obtaining an API Key
Events are rolled up to an API key and the parent real estate company. Inside the Brytelytics dashboard, brokers can select a specific key, or see all events across the company, even across other vendors that use Brytelytics.
Your Brytecore developer liaison can provide you with an API key for each website or app in which you want to install Brytelytics. If you are a Brytecore Partner, you can create keys via the Brytecore API or through the Vendor Provisioning Dashboard.
Importing the Library
Brytecore provides several official SDKs for client-side implementation, including JavaScript for web, Swift for iOS via CocoaPods, and Java for Android.
The libraries wrap HTTP calls in a brytescore function that can be called from your code whenever an event occurs. You simply include the library in your project, and call brytescore function with the event as a parameter.
Use the examples on the right to learn how to import the proper library based on the platform you are using.
Including the snippet is just the first step! You must still track each triggered event with the brytescore function, as shown in the next section.
All official Brytelytics libraries are open source, and can be found on the Brytecore GitHub page at github.com/brytecore.
1pod "BrytescoreAPI"
The brytescore Function
Interaction with the Brytelytics API happens via a single global function, brytescore. It takes two parameters, the event to track and an object containing data related to the event. Acceptable properties of the data object are different per event and are validated via the schema that contains the event.
packageName.eventName
Unless the event is a core Brytelytics event, it is always preceded by the package name. For example, a real estate event to track a user viewing a listing would be realestate.viewedListing.
eventDataObject
The eventDataObject is a JSON object matching the schema specific to the package and event. Package schemas are located in the package folder in a file named schema.json. View the schema for the Real Estate package. The API will validate the data you pass with the package schema.
We recommend validating your data from the package schema before pushing your code into production.
1/* brytescore function syntax. */23brytescore( 'packageName.eventName', eventDataObject );
Packages Explained
A package is a set of rules for a specific line of business that are used by the Brytelytics algorithms to understand and score user behaviors. The only package included by default is the Brytelytics Core Package, which is used to process user sessions, visits, and page views.
Any other package you intend to use must be loaded by the brytescore.load function. This will asynchronously download a package.json file, which is used to define the list of events you can track. View the package.json file for the Real Estate package.
A package includes two files: package.json and schema.json.
| Field | Type | Required | Description |
|---|---|---|---|
package.json | A list of events that can be tracked by the API client | No | A list of events that can be tracked by the API client |
schema.json | The data definitions for valid events and objects | No | The data definitions for valid events and objects |
Updated July 24, 2026