Paste the script in your site
You have the script on your clipboard from Step 1. Now we’ll drop it into the <head> section of your site. This needs to happen on every page, but if your site uses a shared header template (which most do), you only edit one file.
2.1 — Open the file with your <head>
Find the file that holds your site’s shared header. The name depends on how your site is built:
- Hand-coded HTML —
index.html(and every other page’s HTML file) - PHP-based site (WordPress, custom PHP) —
header.php - Static-site generator (Astro, Hugo, Jekyll, 11ty) —
layout.htmlorbaseof.html - Eleventy, Next.js, etc. — the head partial / layout component
Open the file in your editor of choice (VS Code, Sublime, Atom, etc.). The next step shows exactly what to paste and where.
2.2 — Paste just above </head>
The script should be the last thing inside <head>, right before the closing </head> tag. After pasting, the file looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Acme Skincare</title>
<!-- 👇 Paste the AdsPing script just above </head> -->
<script async src="https://api.adsping.io/pb.js?id=YOUR_PIXEL_ID"></script>
</head>
<body>
<!-- … rest of your page … -->
</body>
</html>Your real script will already have your actual Pixel ID in it — the YOUR_PIXEL_ID placeholder above is just for illustration. After pasting, save the file. That’s it for editing.
2.3 — Upload / deploy
Push the change so it’s live on your site. How you do this depends on your hosting:
- FTP / SFTP — upload the modified file
- cPanel / hosting file manager — replace the file in the web root
- Git-based deploy (Vercel, Netlify, Cloudflare Pages) — commit and push
2.4 — Verify it’s loading
Open your site in the browser. Open DevTools (right-click → Inspect) → Network tab → refresh the page. Look for a row called pb.js with a Status 200.
Don’t see pb.js?
- · Open View Source in your browser (Ctrl+U / Cmd+Opt+U) — the script should be visible inside
<head>. If not, the file change didn’t deploy. - · Hard-refresh (Ctrl+Shift+R / Cmd+Shift+R) to bust cached HTML.
- · Check the file you edited is the one that gets served for the page you’re viewing.
✓ The script is on your site. PageView is firing automatically.
Next, we’ll pick the actions (Purchase, Lead, AddToCart, …) you want to track on top of PageView.
Need help? Email us and we’ll do this together on a quick call.