Before you start
You need a Logiwolf account, your website added in the dashboard and the pixel ID that Logiwolf then shows you. The snippet looks like this:
<!-- Pixel Code - Logiwolf -->
<script defer src="https://app.logiwolf.com/pixel/YOUR-PIXEL-ID"></script>
<!-- END Pixel Code -->
Replace YOUR-PIXEL-ID with your own ID. The general steps for every platform are in the installation guide.
Option 1: with the WPCode plugin
WPCode used to be called «Insert Headers and Footers» and prints code in the <head> of every page. According to the plugin directory it runs on more than three million websites.
- 1
Install the plugin
Search the plugin directory for WPCode, install the plugin and activate it.
- 2
Open the header field
Go to «Code Snippets», then «Header & Footer». The plugin page calls the top field «Scripts in Header».
- 3
Paste the snippet
Paste the whole snippet including the
<script>tags into the «Header» field. According to WPCode, code without its tags shows up as plain text on your page. - 4
Save and clear the cache
Click «Save Changes» at the top right. If you use a caching plugin, clear its cache afterwards.
If you only need the basic feature, you can switch WPCode to «Headers & Footers» mode in its settings. The header field works the same way there.
Option 2: through a child theme
Without a plugin, you extend the functions.php of a child theme. The wp_head hook prints code in the head of every page:
// functions.php in a child theme
add_action('wp_head', function () {
echo '<script defer src="https://app.logiwolf.com/pixel/YOUR-PIXEL-ID"></script>';
});
A child theme is its own folder in wp-content/themes. Its style.css needs a Template header that matches the folder name of the parent theme exactly. You activate it under «Appearance», then «Themes». The child theme's functions.php loads in addition to the parent's, so do not copy parent code into it.
Do not edit your theme files directly. WordPress points out that such edits are lost with the next theme update. If you prefer wp_enqueue_script(): since WordPress 6.3 the function takes an array with 'strategy' => 'defer' as its fifth parameter.
Block themes and Full Site Editing
Block themes such as the current default themes have no header.php. That is not a problem: WordPress renders them through template-canvas.php, which still calls wp_head(). WPCode and the child theme code therefore work exactly as on classic themes.
Clear the cache and check delayed JavaScript
Caching plugins serve stored copies of your pages. Until you clear the cache, those copies lack the new code.
- WP Rocket: «Settings», then «WP Rocket», and on the dashboard «Clear and preload cache». The option is also in the WP Rocket toolbar menu.
- LiteSpeed Cache: «LiteSpeed Cache», then «Toolbox», «Purge» and «Purge All».
- WP Super Cache: «Settings», then «WP Super Cache», and delete the cache there.
With WP Rocket, watch the «Delay JavaScript execution» option in the «File Optimization» tab. It holds back every script until the visitor scrolls, clicks or taps. The pixel then starts too late, and visits without any interaction are missing from your statistics. Add app.logiwolf.com/pixel to «Excluded JavaScript Files».
Check the installation
- 1
Open it logged out
Open your website in a private window, so you see the page the way your visitors do.
- 2
Search the source
Search the page source for
app.logiwolf.com/pixel. If it is missing, an old cache is usually still active. - 3
See yourself live
You show up as a live visitor in the Logiwolf dashboard within seconds. If the request to app.logiwolf.com only appears in the developer tools after you scroll, a JavaScript delay feature is active.
Tracking that WordPress plugins bring along
While you install Logiwolf, check which other plugins already collect data. According to Jetpack, Jetpack Stats is activated by default and records, among other things, IP address, user agent, URLs, referrer, browser language and country. Automattic keeps the IP logs for 28 days. You can switch the module off under «Jetpack», then «My Jetpack», «Help» and «All Jetpack modules».
Site Kit by Google places the Google Analytics, Tag Manager and AdSense snippets. Google states that site owners are responsible for managing notice and consent themselves. If you want to drop Google Analytics completely, the guide Replace Google Analytics walks you through it.
Logiwolf sets no cookies. What belongs in your privacy policy depends on which tools run on your website. The legal framework for Switzerland and the EU is explained in the guide to privacy-friendly web analytics.
Other platforms: there are also guides for Shopify, Wix and Webflow.
Sources: WPCode, Global Header and Footer, WPCode in the plugin directory, WordPress Developer, wp_head, WordPress Developer, wp_enqueue_script, WordPress Developer, Child Themes, WordPress, template-canvas.php, WP Rocket, Clear cache, WP Rocket, Delay JavaScript execution, LiteSpeed Cache, Toolbox, WP Super Cache, Jetpack Stats, Site Kit, GDPR compliance and privacy. As of October 2026.