Looking for a free hit counter for Google Sites? Google Sites can't edit raw HTML, but its Embed tool accepts our code and shows the counter — with a flag for every visitor's country — in a box on your page. Ideal for class pages, portfolios and project sites.

Example of a grid flag counter showing visitor flags and counts
The grid layout with sample data — pick any layout, colours and size in the builder.

Step by step

  1. Create your counter

    Design it on our homepage — leave “Only count visits from these sites” empty — click Create my counter and copy the HTML code.

  2. Insert an embed

    Open your site in Google Sites, go to the page and choose Insert → Embed in the panel on the right.

  3. Paste the code

    Choose the Embed code tab, paste the HTML, click Next and then Insert.

  4. Resize and publish

    Drag the box until the whole widget shows, then click Publish.

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 Google Sites

  • Google Sites shows embedded code in a frame on a Google address, so leave “Only count visits from these sites” empty — a domain list would block your visits.
  • Visitors' countries are still detected correctly, because each visitor's browser loads the counter image.

Questions

Why is the counter cut off?

Embed boxes don't resize themselves. Drag the edges of the box until the full widget is visible.

Can I add it to every page?

Google Sites has no shared footer for embeds, so add the embed to each page you want counted.

Add a flag counter to Google Sites

Create your free counter in seconds. No signup, no watermark, no cookies.

Create your counter