Adding Your Site

A site in Inlay represents one domain. You install a single script tag on every page of the domain and create placements to control where ads appear.

Creating a site

Go to Dashboard → Sites → Add site. Enter the site's base URL — this should be the canonical root URL of your domain (e.g. https://example.com). The URL is stored for reference only; it does not restrict which pages can serve ads.

Give the site a name that helps you identify it in the dashboard. Click Create site. Inlay generates a unique siteScriptId — a random identifier embedded in your script tag that ties impressions to your account.

The script tag

After creating a site, copy the generated embed tag from the site detail page:

html
<!-- Inlay — abc12345 -->
<script async src="https://useinlay.com/api/script/abc12345def67890abcdef12"></script>

The tag is a single <script async>element pointing to Inlay's script endpoint. The full ad logic lives on Inlay's servers — when you update the embed script (no action required from you), all sites automatically receive the latest version after the browser cache expires (1 hour TTL).

One tag, all pages

Install the embed tag on every page of your site, not just pages where you expect ads. The script is lightweight and does nothing on pages without a matching placement. Installing site-wide lets you add or change placements later without touching your HTML again.

Installation by stack

Raw HTML

Paste the tag just before the closing </head>:

index.html
<head>
  <!-- your existing head tags -->
  <script async src="https://useinlay.com/api/script/YOUR_SITE_SCRIPT_ID"></script>
</head>

Next.js (App Router)

app/layout.tsx
import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://useinlay.com/api/script/YOUR_SITE_SCRIPT_ID"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

WordPress

Add the following to your theme's functions.php:

functions.php
function inlay_embed_script() {
  wp_enqueue_script(
    'inlay',
    'https://useinlay.com/api/script/YOUR_SITE_SCRIPT_ID',
    [],
    null,
    false
  );
  // Set async
  add_filter('script_loader_tag', function($tag, $handle) {
    if ($handle === 'inlay') {
      return str_replace('<script ', '<script async ', $tag);
    }
    return $tag;
  }, 10, 2);
}
add_action('wp_enqueue_scripts', 'inlay_embed_script');

Webflow

In Webflow, go to Project settings → Custom code → Head code and paste the embed tag there.

Verification

After installing the tag, open a browser tab to your site and open Developer Tools → Network. Look for a request to api/script/[siteScriptId]. A 200 response confirms the script is loading. If you see a 404, double-check that the siteScriptId in your tag matches the one shown in the dashboard.

Site status

Sites can be Active or Inactive. Inactive sites do not serve ads — the serve endpoint returns { "available": false } immediately. You can toggle a site's status from the site settings without deleting it.