Install guide
Install OfferProof AI on WordPress
Add the tracking script to every page of a WordPress site, whichever theme or page builder you use.
Page builders rename their menus often, so we describe what to look for rather than promise exact clicks. If a name below doesn't match your screen, search your builder's help pages for the goal in bold.
Copy your snippet
In OfferProof AI, open Tracked sites, add your site, and copy the snippet from its setup page. It looks like this, with your own site ID and key:
<script>window.offerproof=window.offerproof||function(){(offerproof.q=offerproof.q||[]).push(arguments)}</script>
<script async src="https://cdn.offerproof.net/op.js" data-site="YOUR_SITE_ID" data-key="YOUR_SITE_KEY"></script>
Keep both tags together, and copy yours from the app: YOUR_SITE_ID and YOUR_SITE_KEY are placeholders and won't work. In Domains that may send events, enter the domain your visitors see in the address bar. Subdomains are included, and events from anywhere else are refused.
Add it to WordPress
On WordPress the goal is site-wide header code: code that goes inside <head> on every page. There are three common ways to do it. Use the first one that fits.
A header and footer code plugin (most sites)
- In your WordPress dashboard, open Plugins and search for a plugin that adds code to the site header. Several exist, so choose one that is well reviewed and recently updated.
- Paste the snippet into its header or head box, not the body or footer box.
- Save.
Your theme's own header code setting
Many themes have a box for header scripts in their options. If yours does, paste the snippet there and save.
A child theme, if you edit theme files
Paste the snippet just before </head> in the child theme's header.php. Don't edit the parent theme, because its next update replaces the file. Block themes may not have this file, so use a plugin instead.
Things that catch people out
- Clear any caching plugin and your host's cache after saving.
- Optimisation plugins that combine or delay scripts can stop the snippet. If events don't arrive, exclude it from those features.
- Hosted WordPress.com plans may restrict plugins and custom code. Check what your plan allows.
Check it works
- Publish the page, then open it with
?op_test=1on the end of its address. The setup page has this test link ready for your first domain. It proves the script runs, and isn't counted in your numbers or your allowance. - Back in the app, press Check installation.
- Open the page normally, without the test link. New visits appear within a minute.
If nothing arrives
- Check the snippet is inside <head> on the page you opened, and that the page was republished after you added it.
- Check the page's address is on one of this site's allowed domains. Subdomains of an allowed domain work; a different domain does not.
- Turn off ad blockers and privacy extensions for the test, then reload the page.
- If your page uses data-consent="required", accept the cookie banner: nothing is sent until the visitor agrees.
- If your site sets a Content-Security-Policy, allow script-src https://cdn.offerproof.net and connect-src https://e.offerproof.net https://cfg.offerproof.net.
- Page builders can cache old pages. Clear the cache, then open the test link again.
Before you send traffic
The script never reads what visitors type. You are responsible for your own visitor notices. If visitors must agree to analytics first, add data-consent="required" to the second tag and call offerproof('consent','granted') from your cookie banner: nothing is stored or sent before that.
Stuck? Open a support ticket and tell us your builder and page address. Other builders are in the install guides.