Docs / Quickstart
Product

πŸš€ Quickstart

Install the Glance Intelligent Detect SDK, stream live product activity, record a golden path, and surface in-app coach guidance β€” in a few lines of code.

What you need. A Glance Intelligent Detect product_id and runtime API key from the Console, plus the browser package @glance/intelligent-detect. Analytics webhooks, agent MCP, tours, and email are marked Coming soon in the nav.

Install the SDK

Prerequisites β€” Node.js 18+ (or any bundler that supports ES modules). The package works in modern browsers and SPA frameworks (React, Vue, Next, Vite, …).

npm
npm install @glance/intelligent-detect
pnpm
pnpm add @glance/intelligent-detect
yarn
yarn add @glance/intelligent-detect
npm install @glance/intelligent-detect
# or
pnpm add @glance/intelligent-detect
# or
yarn add @glance/intelligent-detect

Configure credentials

Create keys in the Glance Intelligent Detect Console, then keep the runtime key server-side when possible. The browser SDK needs a publishable / product-scoped key (never a master admin key).

# .env (names are conventional β€” use your platform’s env loader)
GLANCE_PRODUCT_ID=prod_xxxxxxxx
GLANCE_API_KEY=gid_live_xxxxxxxx
GLANCE_BASE_URL=https://gid.glance.com   # your Glance Intelligent Detect API origin

Initialize & identify

import { GlanceIntelligentDetect } from "@glance/intelligent-detect";

const gid = GlanceIntelligentDetect.init({
  productId: process.env.GLANCE_PRODUCT_ID,
  apiKey: process.env.GLANCE_API_KEY,
  baseUrl: process.env.GLANCE_BASE_URL,
});

// Call once the user is known (after login / session restore)
gid.identify({
  userId: "user_123",
  // optional traits for later memory / cohorts
  traits: { plan: "trial", role: "admin" },
});

init starts the collector (pageviews + clicks β†’ POST /v1/events) and the coach client (polls /v1/proactive + /v1/playbook).

🎯 Step 1 β€” Connect your activity stream

Glance Intelligent Detect needs a live stream of what each user is doing before paths or coach can run. The SDK collector is the default path β€” no analytics webhook required.

@glance/intelligent-detect
Browser SDK Β· POST /v1/events Β· X-GID-Key
PostHogSoon
Connect an existing PostHog project
AmplitudeSoon
Connect an existing Amplitude project
FullStorySoon
Full setup guide coming soon
DatadogSoon
Full setup guide coming soon
PendoSoon
Full setup guide coming soon

Manual events (optional)

Most apps only need init + identify. For custom milestones, track explicitly:

gid.track({
  type: "custom",
  title: "Connected bank account",
  canonicalUrl: "/onboarding/bank",
  meta: { provider: "plaid" },
});
Event wire format
POST {baseUrl}/v1/events
Header: X-GID-Key: <apiKey>

{
  "product_id": "prod_xxxxxxxx",
  "user_id": "user_123",
  "type": "pageview",          // pageview | click | submit | custom
  "title": "Page: /settings",
  "description": "User viewed /settings",
  "raw_url": "https://app.example.com/settings",
  "canonical_url": "/settings",
  "timestamp": 1710000000.0,
  "meta": {}
}

πŸ—ΊοΈ Step 2 β€” Record a golden path

This is where Glance Intelligent Detect learns what good looks like. In the Console: Record β†’ perform the happy path in your product β†’ Save. Paths are built from the same SDK event stream β€” Record does not invent a second collector.

Console Β· Record path
Teach-by-doing on live SDK events
Chrome extensionSoon
Record without the console in the middle

πŸ”” Step 3 β€” Add the proactive coach

Steps 1–2 make detection possible. The SDK’s coach client asks the API when to offer help and what to show. You can use the built-in coach UI, or render your own surface from the guidance payload.

Built-in coach (default)

import { GlanceIntelligentDetect } from "@glance/intelligent-detect";

GlanceIntelligentDetect.init({
  productId: process.env.GLANCE_PRODUCT_ID,
  apiKey: process.env.GLANCE_API_KEY,
  baseUrl: process.env.GLANCE_BASE_URL,
  coach: {
    enabled: true,          // default true
    brandName: "Acme",      // optional label on the sheet
  },
});

Bring your own UI

GlanceIntelligentDetect.init({
  productId: process.env.GLANCE_PRODUCT_ID,
  apiKey: process.env.GLANCE_API_KEY,
  baseUrl: process.env.GLANCE_BASE_URL,
  coach: {
    enabled: false,
    onGuidance(guidance) {
      // guidance.title, guidance.steps[{ id, label, selector }]
      yourCoach.show(guidance);
    },
  },
});

Under the hood the client calls GET /v1/proactive and GET /v1/playbook. Tour providers (Appcues, Usertour, …) are Soon.

πŸ€– Step 4 β€” Connect an AI support agent

Give your existing chatbot live context on what the user has been doing β€” pulled over MCP when the agent needs it. Recipes below are on the roadmap.

IntercomSoon
Connect Fin via MCP
MavenSoon
Connect via MCP
DifySoon
Connect via MCP
ZendeskSoon
Full setup guide coming soon

πŸ—ΊοΈ What's next