Install on
WordPress.
Paste one snippet before </body>. Takes under 60 seconds.
1 Quick Install — WPCode Plugin Recommended
Best for non-developers. The WPCode plugin lets you inject code into your site footer without touching any theme files — and it survives theme updates.
- 1 In your WordPress admin, go to Plugins → Add New.
- 2 Search for WPCode — Insert Headers and Footers + Custom Code Snippets.
- 3 Click Install Now then Activate.
- 4 Go to Code Snippets → Header & Footer in the left sidebar.
- 5 Paste your tracking snippet into the Footer box.
- 6 Click Save Changes.
Your tracking snippet
<script>(function(){var i=document.createElement('img');i.width=1;i.height=1;i.style.display='none';i.alt='';i.src='https://aeofix.com/api/bot-pixel?page='+encodeURIComponent(location.pathname)+'&site=YOUR_SITE_ID';document.body.appendChild(i);})();</script>
YOUR_SITE_ID with your actual Site ID from the dashboard snippet banner. If you've rotated your key, use the exact snippet from your dashboard — it already includes &key=xxx.
2 Method 2 — Theme Editor Classic themes only
Works for classic themes that include a footer.php file. Not recommended for block themes (WordPress 6.x+) — use Method 1 or Method 4 instead.
- 1 Go to Appearance → Theme Editor.
- 2 In the right sidebar file list, click footer.php.
-
3
Locate the closing
</body>tag near the end of the file. -
4
Paste your tracking snippet immediately before
</body>. - 5 Click Update File.
footer.php.
3 Method 3 — Child Theme functions.php For developers
The cleanest developer-friendly approach. Add the following function to your child theme's functions.php. The wp_footer hook fires just before </body> on every page.
function aeofix_bot_tracker() {
?>
<script>(function(){var i=document.createElement('img');i.width=1;i.height=1;i.style.display='none';i.alt='';i.src='https://aeofix.com/api/bot-pixel?page='+encodeURIComponent(location.pathname)+'&site=YOUR_SITE_ID';document.body.appendChild(i);})();</script>
<?php
}
add_action( 'wp_footer', 'aeofix_bot_tracker' );
YOUR_SITE_ID with the Site ID shown in your AEOfix dashboard. If you've rotated your API key, use the full snippet from the dashboard snippet banner instead.
4 Block Themes — WordPress 6.x Full Site Editing
If you are using a block theme such as Twenty Twenty-Three, Twenty Twenty-Four, or Twenty Twenty-Five, the Theme Editor does not expose footer.php. Use one of the two options below.
Option A — WPCode Plugin (simplest)
The WPCode plugin (Method 1 above) works perfectly with block themes. It is the recommended approach for non-developers on WordPress 6.x+.
Option B — Site Editor HTML Block
- 1 Go to Appearance → Editor.
- 2 Open the Footer template in the template list.
- 3 Click the + button to add a block, then search for and insert a Custom HTML block.
- 4 Paste your tracking snippet into the HTML block and save.
Verify it's working
After saving your chosen method, confirm the snippet is firing correctly:
- 1 Visit any page of your WordPress site in a browser.
- 2 Open browser DevTools (F12) and go to the Network tab.
-
3
Filter requests by typing
bot-pixelin the filter bar. You should see a request returning 200.