Skip to content
Blog

Installation

There are two ways to work with Tribe. The faster path is to install the AI coding skill and let your agent handle the integration. The more hands-on path is to add the SDK yourself. Both end up in the same place.

Install the Tribe skill once, and your coding agent will know how to integrate every feature. It understands the full SDK surface, framework-specific patterns for React, Next.js, Vue, Svelte, and vanilla JS, and the small gotchas that tend to trip people up.

Run this in your project root. The skill will be available whenever you work in this project:

Terminal window
curl --create-dirs -so .claude/commands/tribe.md https://tribe.utopian.build/tribe.md

Invoke it with /tribe or just mention what you want to build. Something like “add Google login using Tribe” is enough.

Download the SDK reference file and feed it as context to whatever agent you’re using:

Terminal window
curl -so tribe-sdk.md https://tribe.utopian.build/tribe.md

The file covers every method, both installation options, and idiomatic patterns for all the major frameworks. It’s written as a prompt, so agents pick it up naturally.

Once installed, you can describe what you want in ordinary language and the agent generates working integration code:

Add Google and GitHub social login to my React app using Tribe
Set up a payment page that accepts SOL and USDC with QR codes
Add a feedback widget to my app using Tribe

The agent takes care of boilerplate, error handling, and framework-specific patterns so you don’t have to look up every method signature yourself.


If you’d rather write the integration by hand, you have two options.

The simplest approach. Drop this into your HTML and you’re done, no build step needed:

<script src="https://api.tribe.utopian.build/sdk.js?site=YOUR_SITE_ID" defer></script>

This creates a global Tribe object with every SDK method. Pageview auto-tracking starts immediately.

Terminal window
npm install @tribecloud/sdk
import { Tribe } from "@tribecloud/sdk";
const tribe = new Tribe({
siteId: "YOUR_SITE_ID",
autoTrack: true, // this is the default
});

You can also use the static factory if you prefer that style:

const tribe = Tribe.init({ siteId: "YOUR_SITE_ID" });
FrameworkNotes
React / ViteUse the npm package. Initialize once at the app root.
Next.js (App Router)SDK usage must live in "use client" components since it needs browser APIs.
Vue / SvelteUse the npm package. Initialize in your main entry file.
Vanilla JS / HTMLUse the script tag. Everything lives on the global Tribe object.
  1. Open the Tribe dashboard
  2. Create a new site or select an existing one
  3. Go to Settings
  4. Your Site ID is right there