Skip to main content

CDN Script

The fastest integration — paste one tag into your <head> and the hosted loader handles the rest. Schemas are fetched and injected by JavaScript after the page loads.
Schemas are client-injected, not in the raw HTML source. Google indexes them after executing JavaScript (typically a few seconds after the page loads). For schemas in HTML source, use the Next.js SDK or another server-side method.

Add the tag

Paste this into the <head> on every page of your site:
Replace YOUR_PROJECT_ID with the Project ID from your InstantSchema dashboard.

Attributes

How it works

The loader reads data-project-id and window.location.pathname, calls /api/v1/structured-data, then appends each schema as a <script type="application/ld+json"> tag to <document.head>.

Detection

The dashboard detects the CDN script by scanning your site’s HTML source for the loader tag. Once the tag is live, the integration panel will show Integration active · via CDN script (the panel polls every 8 seconds while unconfirmed).