Showing a Hit Counter

With your embed script loaded, you can add a classic-style hit counter to your website and style it as needed. Remember those from the early web days? We’re bringing them back, but better!

Availability

This feature is available on our free plan and all paid plans. Yes, you read that right!

Setting Up the Hit Counter

It’s a simple two-step process:

1. Modify Your Embed Script

Add the hits parameter to your embed script URL:

https://tinylytics.app/embed/YOUR_EMBED_CODE.js?hits

This loads the additional hit counter functionality.

2. Add the Display Element

Add this HTML element wherever you want to display the hit count:

<span class="tinylytics_hits"></span>

Note: You’re not limited to using a span - you can use any HTML element. The important part is the class="tinylytics_hits" attribute.

How It Works

Once your page loads: 1. The script looks for any element with the tinylytics_hits class 2. When found, it replaces the element’s content with your site’s lifetime hit count 3. The count updates automatically

Styling

You have complete control over the styling. The hit counter inherits your site’s styles by default, but you can customize it with CSS to match your design.

Examples

You can see the hit counter in action: - On our homepage (check the footer) - On various sites in our webring

Tips

  • You can add multiple hit counters on the same page
  • The count is updated in real-time
  • Works great with any CSS framework
  • Perfect for retro-style websites!