How to Display a View Counter on Webflow Articles
Learn how to display a view counter on your Webflow articles with the free CountAPI.
In this tutorial, Sandro, cofounder of the Gemeos Webflow agency, shows you how to display a view counter on your Webflow articles with CounterAPI
Example
Understanding CounterAPI
CounterAPI is a free service that exposes a simple REST API for incrementing and reading counters. Each counter is identified by a namespace and a key. The /v1/namespace/key/up call increments the counter and returns the current value in a single request.
1. Add a Text Block to display views
In Webflow, create a Text Block with the ID view-count where you want to display the view count (article header, near the date...).
2. Set a unique key for each article
Each article needs a unique key. The script automatically uses the URL slug as the key: /academy/mon-article becomes academy-mon-article. No manual setup needed.
3. Add the script in Footer code
Replace gemeos with your own namespace in the script. The namespace keeps your counters separate from other CounterAPI users.
4. Read-only mode (no increment)
To display the counter without incrementing it (in preview or for admins), use /get instead of /up:
Conclusion
CounterAPI is the fastest way to display views on Webflow without a backend. Use cases:
- View counter on blog articles
- Popularity of resources in a library
- Social proof on landing pages ("already viewed 1,240 times")
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.















