Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 974 Bytes

File metadata and controls

43 lines (30 loc) · 974 Bytes

Split SDK

On-chain based, Referral SDK for Web3 applications.

Setup

# Using npm
npm install @split-tech/browser-sdk

# Using yarn
yarn add @split-tech/browser-sdk

API Key

Get your API key from Split Partner App.

Usage

// _app.tsx
import React from "react";
import { SplitBrowserProvider } from "@split-tech/browser-sdk";

export default function App({ Component, pageProps: { sessions, ...pageProps } }: AppProps) {
  return (
    <SplitBrowserProvider apiKey={YOUR_API_KEY} config={{ referralParams: "referredBy", interval: 10000 }}>
      <Component {...pageProps} />
    </SplitBrowserProvider>
  );
}

Error Messages

  • SplitSDKError: Invalid API Key
  • SplitSDKError: Invalid referral code
  • SplitSDKError: Failed to add referral data.

More Information

For more detailed documentation visit here Split SDK Documentation.