How to add a flag counter to Squarespace
Add a free flag counter to Squarespace with a Code block. Our code is plain HTML with no JavaScript, so it works on every plan — including Personal.
Updated · takes about 2 minutes
The Code block is the easiest home for a flag counter on Squarespace. Higher plans are only needed for JavaScript and iframes — and Live Flag Counter uses neither: its code is a plain HTML image link, so it works on every plan.
Step by step
-
Create your counter
Design it on our homepage, click Create my counter and copy the HTML code.
-
Edit the page or footer
Open the page where the counter should appear and click Edit. To show it on every page, edit your site's footer instead.
-
Add a Code block
Add a block, choose Code and paste the HTML. If Display Source is switched on, turn it off — otherwise the code is shown as text.
-
Save and publish
Apply the block and save your changes, then open your live site to see the counter.
What the code looks like
This is the HTML code. Yours contains your own counter ID instead of YOUR-ID, so always copy it from your counter's page.
<a href="https://liveflagcounter.com/stats/YOUR-ID" target="_blank" rel="noopener"> <img src="https://liveflagcounter.com/c/YOUR-ID.png" alt="Live Flag Counter" width="456" style="max-width:100%;height:auto"> </a>
Tips for Squarespace
- The code already contains the widget's natural width. If it looks small or squeezed, check that the block isn't inside a narrow column.
- Statistics are public by default, so visitors who click the counter can see them. You can make them private in the counter's settings.
Questions
Do I need the Core or Business plan?
No. Those plans are needed for JavaScript and iframes. The flag counter is a plain HTML image link, which works on every plan.
Why does my code show up as text?
Turn off Display Source in the Code block.
Add a flag counter to Squarespace
Create your free counter in seconds. No signup, no watermark, no cookies.
Create your counter