Quick Start
Getting Tribe into your app takes about as long as making a cup of coffee. Create a site, drop in a script tag or install a package, and your app picks up authentication, analytics, and everything else the platform offers.
-
Create a site in the Tribe dashboard. You’ll find your Site ID on the settings page.
-
Add the SDK to your project.
<script src="https://api.tribe.utopian.build/sdk.js?site=YOUR_SITE_ID" defer></script>Once loaded, a global
Tribeobject is available. Call methods directly:Tribe.login(...),Tribe.track(...), and so on.Terminal window npm install @tribecloud/sdkimport { Tribe } from "@tribecloud/sdk";const tribe = new Tribe({ siteId: "YOUR_SITE_ID" }); -
Try it out. Here’s a one-liner that adds login to your app:
<script defer>window.addEventListener("DOMContentLoaded", async () => {const session = await Tribe.getSession();if (!session) {Tribe.redirectToLogin();return;}console.log("Welcome!", session.user);});</script>const session = await tribe.getSession();if (!session) {tribe.redirectToLogin();}
That’s genuinely all it takes. Your app now has a full authentication flow with email and password, social login, and magic links, all running through Tribe’s hosted pages.
What happens automatically
Section titled “What happens automatically”The moment you add the SDK with default settings, a few things start working in the background:
- Pageview tracking fires on every page load and SPA navigation without any configuration.
- Session management stores and refreshes auth tokens in localStorage automatically.
- Announcement dismissals persist locally and sync to the server when the user is logged in.
Where to go next
Section titled “Where to go next”- Install the AI coding skill so you can add Tribe features by describing what you want
- Build custom login forms if the hosted pages don’t match your design
- Track custom events beyond the automatic pageview tracking
- Accept crypto payments from your users