YOUR_SITE_KEY is a placeholder in the examples below. Site keys begin with pe_site_, and PromptEden shows the complete value only when it is created or replaced.Direct HTML
- Open the shared layout or template that renders the
<head>on every page. - Paste the exact generated tag before
</head>. - Deploy the change, then view the published page source and confirm there is exactly one matching script.
<script async src="https://cdn.prompteden.com/eden.js" data-site="YOUR_SITE_KEY"></script>WordPress
Use the site-wide header-code feature provided by your host, theme, or organization-approved header/footer plugin so the tag appears in the initial server-rendered HTML:
- Open the tool that adds code to the global
<head>. - Paste the exact generated script.
- Apply it to the whole site, not one page or post.
- Clear the WordPress and CDN caches before running the live check.
For a custom theme, add the tag to the shared header immediately before the theme's wp_head() output or use a small site plugin attached to wp_head. Keep the change outside a vendor theme file so a theme update does not remove it.
Next.js App Router
Add the canonical <script> tag directly inside <head> in app/layout.tsx. Because Verify installation inspects the server-rendered HTML response without executing client JavaScript, use a literal <script> element rather than next/script's inline loader so the verifier can see the exact src and data-site attributes in initial HTML.
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
<script
async
src="https://cdn.prompteden.com/eden.js"
data-site="YOUR_SITE_KEY"
/>
</head>
<body>{children}</body>
</html>
);
}Google Tag Manager
PromptEden's Verify installation check fetches your homepage over HTTP and inspects the initial server-rendered HTML without executing client-side JavaScript or Google Tag Manager containers. If you deploy the tag only through a GTM Custom HTML tag, browsers will send pageviews once the container runs, but the server-side script check will report script missing. For Verify installation to pass, publish the canonical <script> tag directly in your server-rendered <head> (using Direct HTML, WordPress, or Next.js above) rather than injecting it solely through GTM.
If you still deploy via GTM for client-only collection, use a single Custom HTML tag with one All Pages page-view trigger and do not add a History Change trigger (the script observes client-side route changes itself), and do not also place the tag in <head> on the same page.
Single-page apps
Install the script once in the root HTML or application layout. PromptEden watches History API changes, browser back/forward navigation, and hash changes. You do not need to send a second pageview or load the script again when a route changes.
- Do not add a GTM History Change trigger for the same tag.
- Do not mount the script inside a page component that rerenders on navigation.
- Test one full page load and one client-side route change; each should produce one pageview.
Content Security Policy
If your site sends a Content Security Policy, append the script host and collector host to your existing directives rather than replacing your policy:
script-src 'self' https://cdn.prompteden.com;
connect-src 'self' https://app.prompteden.com;If your policy defines script-src-elem, allow https://cdn.prompteden.com there as well; if your policy uses nonces or 'strict-dynamic', include the appropriate nonce on the <script> tag or allow the host according to your CSP model. Because the two Verify installation checks run server-side from PromptEden, your site's CSP does not cause those verifier rows to fail, but a restrictive CSP will block visitors' browsers from loading eden.js or sending pageviews to the collector.
Verify the published markup
Before clicking Verify installation, confirm the tag is present in the HTML returned by your production hostname:
curl -Ls https://example.com/ | grep 'cdn.prompteden.com/eden.js'The source must be exactly https://cdn.prompteden.com/eden.js: no query string, alternate CDN, proxy URL, or staging path. When it loads, that stable URL redirects once on the same host to the current content-hashed path under /eden/v1/. Keep the stable URL in your tag instead of copying the hashed location. If the command returns nothing, check your deployment, CDN or page cache, and whether your framework or tag manager is injecting the script only on the client.