<head> section takes just a few minutes.
Step 1: Open Your HTML
Locate the HTML file that contains your site’s<head> section. This is typically:
index.htmlfor static sites- A layout or template file for frameworks
- Your theme’s header file for CMS platforms
Step 2: Add the Snippet
Copy the Pockla snippet:<head> section:
Step 3: Save and Deploy
Save your changes and deploy to your live site.Verify Installation
Open your site in a browser and check that the snippet is present:- Right-click the page and select View Page Source
- Search for
pklid— you should see the Pockla snippet in the<head>section
Framework-Specific Notes
Next.js / React
Next.js / React
For Next.js, add the snippet to your root layout using Or use
dangerouslySetInnerHTML:next/script with beforeInteractive strategy:Vue / Nuxt
Vue / Nuxt
For Nuxt 3, add to
nuxt.config.ts:Astro
Astro
Add to your layout’s
<head>:Static HTML
Static HTML
Simply add the snippet to every page’s
<head>, or to a shared header include file.Troubleshooting
Snippet not loading
Snippet not loading
- Check for typos in the snippet
- Ensure there are no JavaScript errors blocking execution
- Verify the snippet is inside
<head>, not<body>
Personalization not appearing
Personalization not appearing
- Confirm the URL includes a valid
pklidparameter - Confirm you’ve published personalization rules in Pockla
- Check that the visitor matches your targeting criteria
- Clear your browser cache and reload
Flash of unpersonalized content
Flash of unpersonalized content
- Make sure the snippet is the very first thing in your
<head> - Ensure no other scripts are blocking Pockla from loading
Need Help?
Contact Support
Get help with installation