<head> section can be done in several ways. Choose the method that works best for you.
The Script
Method 1: Using a Plugin (Recommended)
The easiest way is to use a header/footer plugin.1
Install a Plugin
Install and activate one of these plugins:
- Insert Headers and Footers (by WPBeginner)
- WPCode (formerly Insert Headers and Footers)
- Header Footer Code Manager
2
Add the Script
Go to the plugin’s settings (usually under Settings or Tools)Paste the Pockla script in the Header section:
3
Save
Click Save to apply changes
Method 2: Theme Editor
Add the script directly to your theme’s header file.1
Open Theme Editor
Go to Appearance → Theme File Editor(On older WordPress versions: Appearance → Editor)
2
Find header.php
In the right sidebar, click on header.php (or Theme Header)
3
Add the Script
Find the
<head> tag and paste the Pockla script right after it:4
Update File
Click Update File to save
Method 3: functions.php
Add the script programmatically via your theme’s functions file.1
Open functions.php
Go to Appearance → Theme File Editor and select functions.php
2
Add the Code
Add this code at the end of the file:The
1 priority ensures it loads early in the <head>.3
Update File
Click Update File to save
Frequently Asked Questions
Which method should I use?
Which method should I use?
- Plugin method – Best for most users. Survives theme updates.
- Theme editor – Quick but temporary. Lost on theme updates.
- functions.php – Good for developers. Use a child theme.
How big is the Pockla script?
How big is the Pockla script?
Less than 4KB when gzipped—extremely lightweight.
Will this affect my site's performance?
Will this affect my site's performance?
No. The script is highly optimized and served from a global CDN.
Is it compatible with caching plugins?
Is it compatible with caching plugins?
Yes. The Pockla script works with all major caching plugins (WP Rocket, W3 Total Cache, etc.). You may need to clear your cache after installation.
Can I use Google Tag Manager instead?
Can I use Google Tag Manager instead?
We don’t recommend GTM for Pockla. GTM loads scripts with a delay, causing flicker. Install directly in the header for the best experience.
Can I remove the script later?
Can I remove the script later?
Yes. Remove it from wherever you added it (plugin settings, header.php, or functions.php).
Need Help?
Contact Support
Get help with WordPress installation