Skip to content

Install PageFox with your coding agent

Copy one complete instruction into the coding agent working on your website. Review the change, replace the placeholder with your website ID, and deploy as usual.

Seven platforms · one verified script

<script defer src="https://pagefox.co/widget.js" data-website-id="your-website-id"></script>

The line your agent adds · replace your-website-id

[ 01 / 03 ] · Prompt

Give your coding agent the complete instruction.

Prompt · for your coding agent
Install PageFox in this website's existing codebase.

Use this script, replacing your-website-id with the PageFox website ID I provide:
<script defer src="https://pagefox.co/widget.js" data-website-id="your-website-id"></script>

Choose the matching framework guidance below. Make the smallest safe change, keep the script site-wide, and do not expose secrets or invent a PageFox API key.

HTML / Custom: Your shared HTML template; Immediately before the closing body tag. Paste the PageFox script tag once in the shared template used by every page. Caveats: Publish the changed template before checking whether PageFox is detected.
Next.js: app/layout.tsx; Inside the root layout body. Import Script from next/script. Render the PageFox script in app/layout.tsx with strategy="afterInteractive" and preserve the data-website-id attribute. Caveats: Do not place it in a client component that can unmount during navigation.
WordPress: A child theme or header/footer injection plugin; Footer, immediately before the closing body tag. Add the PageFox script through a child theme or a reputable header/footer injection plugin. Caveats: Editing a parent theme functions.php or footer.php can be overwritten by a theme update.
Webflow: Project Settings → Custom Code; Footer Code. Paste the PageFox script in Footer Code. Caveats: Republish the Webflow site before checking installation.
Squarespace: Settings → Advanced → Code Injection; Footer. Paste the PageFox script into the Footer field and save. Caveats: Publish the site before checking installation. Code Injection availability depends on the Squarespace plan.
Shopify: Online Store → Themes → Edit code → layout/theme.liquid; Immediately before the closing body tag. Paste the PageFox script once in theme.liquid and save the theme. Caveats: Shopify checkout pages are not editable on plans below Shopify Plus.
Google Tag Manager: A Custom HTML tag; All Pages trigger. Paste the complete PageFox script tag verbatim into a Custom HTML tag and attach an All Pages trigger. Caveats: GTM injects the tag, so document.currentScript behaves differently from a normally parsed script; keep the data-website-id attribute on the script itself. Respect the site consent-mode policy and defer the tag when consent requires it.

After editing, tell me which file changed and what I must publish or deploy. For PageFox's public machine-readable install guide, see https://pagefox.co/llms.txt.
[ 02 / 03 ] · Confirm

How to confirm it worked.

Stack-specific checks live on the per-platform pages, one per framework below.
  1. 01Publish or deploy the change, the way you normally would.
  2. 02Open a page of your site in a normal browser window. That visit is all we need.
  3. 03Back in PageFox, your site moves from Not installed to Receiving.
  4. 04Nothing yet? Give it a minute and look again. A quiet site can simply have had no visits.
[ 03 / 03 ] · Platforms

Supported placement guidance.

Where the line goes on each platform.

Your next lead may already be on your site.