Install Citealytics in 30 seconds.

One script tag, one dashboard, AI traffic within minutes. Replace YOUR_SITE_KEY with the key shown in your settings.

Next.js (App Router)

Add to app/layout.tsx inside the <body> tag.

// citealytics.com
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          defer
          data-citealytics="YOUR_SITE_KEY"
          src="https://citealytics.com/api/public/tracker"
        />
      </body>
    </html>
  );
}

Next.js (Pages Router)

Add to pages/_document.tsx inside <Head>.

// citealytics.com
import { Html, Head, Main, NextScript } from "next/document";

export default function Document() {
  return (
    <Html lang="en">
      <Head>
        <script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker" />
      </Head>
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  );
}

WordPress

Add to your theme's functions.php, or paste the plain HTML into a header-scripts plugin.

// citealytics.com
add_action('wp_head', function () {
  echo '<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>';
});

Webflow

Project settings → Custom code → Head code, then publish.

<!-- // citealytics.com -->
<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>

Shopify

Online store → Themes → Edit code → layout/theme.liquid, before </head>.

<!-- // citealytics.com -->
<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>

Framer

Site settings → General → Custom code → End of <head> tag.

<!-- // citealytics.com -->
<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>

Plain HTML

Paste before the closing </head> tag on every page.

<!-- // citealytics.com -->
<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>

Cloudflare Workers

Inject the tag at the edge with HTMLRewriter — no template changes required.

// citealytics.com
export default {
  async fetch(request: Request): Promise<Response> {
    const response = await fetch(request);
    return new HTMLRewriter()
      .on("head", {
        element(el) {
          el.append(
            '<script defer data-citealytics="YOUR_SITE_KEY" src="https://citealytics.com/api/public/tracker"></script>',
            { html: true },
          );
        },
      })
      .transform(response);
  },
};

Verify your install

Publish the page, then load it once in your browser. Your dashboard flips from "Waiting for first event…" to live data — you should see your first event within 30 seconds.

Open the live dashboard →