This component tracks and displays the number of visits to each page. It automatically increments and persists the view count across all visitors using a Supabase database
Make it with Workshop
Build your own component with AI
This component tracks and displays the number of visits to each page. It automatically increments and persists the view count across all visitors using a Supabase database. No need for additional APIs/subscriptions/set up. Just drag and drop and see it in effect.
This component a part of the 400+ components, layouts, templates, UI Kits and code overrides from SegmentUI PRO. Click here to see the full library
Copy and paste the PageViews component code into your project file
Add the component where you want to display the view count
Customize the appearance through the properties panel:
Set the suffix text
Adjust the font settings
Change the text color
The counter will automatically start tracking views when published
Note: In preview mode, you'll see a placeholder "123"
The actual count appears only on the published site
The component is pre-connected to a public Supabase database that tracks page views per URL automatically. You just need to copy and paste it on your page. The views are tracked based on the URL of your published site.
You can customize through property controls:
Suffix: Text that appears after the number (e.g., "views", "visitors")
Font: Complete typography control
Text Color: Color of the counter text
Note: The component uses a shared public Supabase instance with rate limiting and row-level security in place. While this isn't the most secure approach, it enables drag-and-drop functionality since we're only tracking basic interactions.
For any queries and help setting up the component, contact hello@segmentui.com