On-chain based, Referral SDK for Web3 applications.
# Using npm
npm install @split-tech/browser-sdk
# Using yarn
yarn add @split-tech/browser-sdk
Get your API key from Split Partner App.
// _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>
);
}
SplitSDKError: Invalid API Key
SplitSDKError: Invalid referral code
SplitSDKError: Failed to add referral data
.
For more detailed documentation visit here Split SDK Documentation.