# Installing Alphie

> Alphie identifies the companies visiting your website, scores them against
> your Ideal Customer Profile, engages them with personalized content, and
> hands the warmest leads to your team in Slack.

This document is written for coding agents installing Alphie into a codebase.
Alphie is a product of AI Recruitment Technologies Inc.

## The snippet

Add this one script tag. Replace `wk_YOUR_WIDGET_KEY` with the widget key from
the customer's Alphie dashboard -- it is a public key, safe to ship in client
HTML, and is not a secret.

```html
<script
  async
  src="https://q.meetalphie.com/widget/widget-sdk.min.js"
  data-widget-api-key="wk_YOUR_WIDGET_KEY"
  data-widget-base-url="https://q.meetalphie.com"
></script>
```

| Attribute | Required | Value |
| --- | --- | --- |
| `src` | yes | `https://q.meetalphie.com/widget/widget-sdk.min.js` |
| `data-widget-api-key` | yes | The customer's widget key, starting `wk_` |
| `data-widget-base-url` | yes | `https://q.meetalphie.com` |

## Where it goes

**Put it in the frontend framework itself**, so it is present in the initial
document on every route.

Next.js App Router (`app/layout.tsx` or `app/layout.js`), using `next/script`:

```tsx
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
      <Script
        id="alphie-widget"
        src="https://q.meetalphie.com/widget/widget-sdk.min.js"
        strategy="afterInteractive"
        data-widget-api-key="wk_YOUR_WIDGET_KEY"
        data-widget-base-url="https://q.meetalphie.com"
      />
    </html>
  );
}
```

Next.js Pages Router: `pages/_document.tsx`. Nuxt: `app.vue` or `nuxt.config`
`app.head.script`. SvelteKit: `src/app.html`. Plain HTML: before `</body>` on
every page.

### Do not install it through Google Tag Manager

GTM fires late in page load. Alphie's value is identifying and engaging a
visitor in the opening seconds of the session, so a tag-manager install loses
exactly the window the product exists to capture. Put the tag in the app.

### Do not inject it from the CMS

Content-layer injection -- a Sanity Studio config, a WordPress plugin field, a
theme setting -- has the same problem plus an ownership one: the tag ends up
somewhere the application team does not look, and it silently disappears on a
CMS migration. Keep it in the framework, in version control.

## Verifying the install

1. Load the site in a browser and open DevTools.
2. **Network:** `widget-sdk.min.js` returns 200 from `q.meetalphie.com`.
3. **Console:** the SDK logs a line beginning `[WidgetSDK` on initialization
   (it includes the SDK version, e.g. `[WidgetSDK v1.0.0] Init start`).
4. **Page:** the Alphie launcher appears.
5. Confirm it is present on more than one route -- a common failure is adding
   the tag to a single page component instead of the shared layout.

If the script loads but no launcher appears, check the console: the SDK skips
initialization for traffic it identifies as automated, so headless browsers and
crawlers will log that it stopped early. Test in a normal browser session.

## What the widget does and does not collect

Alphie acts as a **Service Provider** (Processor) under CCPA/CPRA to the
website operator, not as a data broker.

- Alphie's servers receive a visitor's IP address only to pass it to identity
  resolution providers during the visit. It is not stored or logged. Providers
  return only resolved company or professional information.
- In the US, Canada, Australia, New Zealand, Singapore, India and Mexico,
  Alphie identifies a visitor's company unless the visitor declines consent or
  sends Global Privacy Control. In the EEA, the UK, Switzerland and all other
  countries it does so only after the visitor accepts the site's consent
  banner. Visitors in China, Russia and sanctioned countries are not
  identified.
- A **Global Privacy Control** signal from the visitor's browser is treated as
  a request to disable identity resolution for that session. No configuration
  is required.
- Alphie does not "sell" personal information processed through customer
  websites, and does not "share" it for cross-contextual behavioral
  advertising, as those terms are defined under the CCPA/CPRA.

Full detail: https://meetalphie.com/privacy
Current sub-processors: https://meetalphie.com/sub-processors
Data Processing Addendum: https://meetalphie.com/dpa

## After the install

- **Public API** -- read-only REST for syncing identified companies and
  captured contacts into a CRM, warehouse or any other tool:
  https://meetalphie.com/api
- **MCP server** -- connect Alphie to Claude and ask who visited the site,
  read-only: https://meetalphie.com/mcp
- **Slack integration** -- qualified-lead alerts and live chat from Slack:
  https://meetalphie.com/slack-integration
- **Site index for agents:** https://meetalphie.com/llms.txt
