How to install Clerion on WordPress
To add analytics to WordPress with Clerion, install the free WPCode plugin, open Code Snippets, Header & Footer, paste the Clerion script tag into Header and save. Developers on a classic theme can paste it into a child theme's header.php instead.
Start your Clerion trial and get your snippet
14-day trial, no card to sign up. A card is only asked if you start a paid plan trial from the upgrade modal.
What do you need before you start?
Three things: a Clerion account, admin access to your WordPress dashboard, and the snippet Clerion gives you after you add your site. When you type your site's address into Clerion, it recognises WordPress from the page itself and shows the WordPress steps next to your snippet. This guide is the same steps with a little more context.
The snippet looks like this. The copy inside Clerion carries your real key and site id, so copy it from there rather than from this page.
<script
src="https://api.getclerion.com/sdk/clerion-analytics.js"
data-api-key="YOUR_API_KEY"
data-website-id="YOUR_WEBSITE_ID"
></script>
It loads deferred, so it does not slow the page, and it sets no cookies. If you want the plain-HTML version of these steps, see Paste this one line.
Which way should you install it on WordPress?
There are two routes. Clerion's install docs recommend the first.
| Route | Best for | Survives a theme change |
|---|---|---|
| WPCode plugin, Header field | Most sites, no code editing | Yes, the code lives in the plugin |
Theme file header.php in a child theme |
Developers on a classic theme | No, it moves with the theme |
How do you add Clerion with the WPCode plugin?
WPCode (formerly Insert Headers and Footers) is a free plugin on WordPress.org. Its Header field prints whatever you paste into the head of every page.
- In your WordPress dashboard, go to Plugins, Add New, search for WPCode and install and activate it.
- Open Code Snippets, then Header & Footer.
- Paste the Clerion snippet into the Header box. Include the opening and closing script tags.
- Click Save Changes.
- If you run a caching plugin or host-level cache, clear it so visitors get the new page.
That is the whole install. Because the code is stored by WPCode and not in your theme, switching or updating your theme does not remove it.
On WordPress.com (the hosted service), installing plugins needs a paid plan. WordPress.com lists Personal, Premium, Business and Commerce as the plans that allow it. On a self-hosted WordPress site, any admin can install the plugin.
How do you add it in the theme instead?
If you prefer not to add a plugin, paste the snippet into header.php just before the closing head tag. Do this in a child theme. A parent theme update can overwrite header.php, and your snippet would go with it. The WordPress developer handbook explains how child themes work if you do not have one yet.
Newer block themes (the ones you edit in the Site Editor) usually have no header.php at all. On those, the plugin route is the simple one.
How do you check Clerion is counting visits?
Open your site in another tab. Clerion's install screen updates on its own, and Clerion emails you when the first visit lands. The live pulse on the Overview refreshes every 30 seconds.
If nothing shows up, use "Pasted it? Check my site" on the install screen. It fetches your live page and tells you whether the snippet is there, missing, or carrying an old key. The usual WordPress causes:
- A cached page. The snippet is saved but visitors still get the old HTML. Clear the cache.
- Two copies. The snippet is in the theme and in WPCode, so every visit counts twice. Keep one.
- Loaded through Google Tag Manager. Clerion's docs advise against this, because ad blockers block the tag manager on many devices and the tag never runs. Paste the line directly.
- Your own browser opts out. Clerion does not count browsers with Global Privacy Control or Do Not Track on.
More detail is in Clerion's check your installation docs.
Do you need a cookie banner for this?
Not for Clerion. It counts visits without setting cookies, holds data in the EU, and never sells it. Other plugins on your site may still need consent, so check those separately. The longer answer is in do you need a cookie banner for website analytics.
What will you see once it is running?
Clerion is website intelligence for AI founders: one script tag, then a short daily briefing that says the one thing worth doing on your site, with your own numbers as evidence. Out of the box it counts pageviews, referrers and campaigns, and it shows referrals from ChatGPT, Perplexity, Claude, Gemini and Copilot as their own channel. If you are on WordPress because you publish a lot, that AI channel is usually the first thing worth reading. For the background, see how to track ChatGPT traffic to your website and how to track Perplexity traffic.
The briefing gets useful once it has about a week of data. Until then, the numbers fill in from your first visitor.
Next step
Install WPCode, paste the line into Header, save, and visit your site once.
Add Clerion to your WordPress site
14-day trial, no card to sign up. A card is only asked if you start a paid plan trial from the upgrade modal.
Frequently asked questions
Where do I paste the Clerion script in WordPress?
The easiest place is the Header box in the free WPCode plugin, under Code Snippets, Header & Footer. Save changes and it loads on every page. You can also paste it into header.php in a child theme, just before the closing head tag.
Can I add Clerion on a free WordPress.com site?
WordPress.com only allows plugin installs on paid plans: Personal, Premium, Business and Commerce. The WPCode route needs one of those. Self-hosted WordPress sites have no such limit.
Why not paste it straight into my theme's header.php?
A parent theme update can overwrite header.php and remove the snippet. If you edit the theme, use a child theme. Block themes often have no header.php, so the plugin route is simpler there.
I pasted the snippet but Clerion shows no visits. Why?
Most often a cache is serving the old page, so clear it. Then use Pasted it? Check my site on the Clerion install screen. Also check you did not load it through Google Tag Manager, which ad blockers block.
Should I load Clerion through Google Tag Manager on WordPress?
Clerion's install docs advise against it, because ad blockers block the tag manager on many devices and the tag never runs. Paste the script directly with WPCode or in the theme.