Skip to content
Blog

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.

  1. Create a site in the Tribe dashboard. You’ll find your Site ID on the settings page.

  2. 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 Tribe object is available. Call methods directly: Tribe.login(...), Tribe.track(...), and so on.

  3. 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>

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.

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.