Running on the Backend

Install Begin’s Library

First, install Begin’s library by calling:
npm install beginai
This will initiate the installation process.

Add Your Account Credentials

Next, open your code editor and import the library; then initialize it with the app_id and license_key that you can find under your settings menu in your account.
import { BeginWorker } from "beginai"; const beginWorker = BeginWorker.instance(APP_ID, LICENSE_KEY)
Code sample of import command. Make sure to replace APP_ID and LICENSE_KEY with your ID and key.

Load Your Data

Now you’re good to load your users’ data for processing on your computer. Copy the code from the JavaScript section on the Integration Code page to your SDK.
notion image
☝️
DON’T FORGET! All fields and interactions must be defined in the schema before they are used in the SDK.
For more information on what each field represents, refer to our field guide:
🧭
Integration Code Field Guide - JavaScript

Start Learning

Once you’ve loaded your data, the final step is to send the following call:
beginWorker.learnFromData();
When you write learn from data, anonymized and secure signatures are generated and sent to Begin platform to initiate the machine learning process.
💡
RUNNING ON MULTIPLE PLATFORMS? You can process users from any SDK simultaneously. Once you make the above call, the system will merge the learnings across all platforms automatically.