Page Hit Counter Concrete 5.7
Permalink 1 user found helpful
Im looking for a Page Hit Counter Block that can be added to a sitewide footer and give views per page and may per site and per month type statistics. I noticed there was one for 5.6 that does a similar job.http://www.concrete5.org/marketplace/addons/stats/...
Is this fairly easy to achieve or can someone produce a block for this.
Is this fairly easy to achieve or can someone produce a block for this.
Hi mrkdilkington
My site is internal so I don't know whether Google analytics would be suitable. So there's no simple way to count every visit to a page (doesn't have to be unique really just a simple page counter)
My site is internal so I don't know whether Google analytics would be suitable. So there's no simple way to count every visit to a page (doesn't have to be unique really just a simple page counter)
@dkw15
I need a basic page counter for some projects I am working on. I've been given some advice on how to make something light that should do the job. When it is done I will put it in the marketplace.
Are your internal users logged in?
I need a basic page counter for some projects I am working on. I've been given some advice on how to make something light that should do the job. When it is done I will put it in the marketplace.
Are your internal users logged in?
Some are some are just guests. I have user accounts enabled. But ideally, it would just recognise anyone has been on the page and just increment by one. Doesn't particularly matter if they have revisited or are logged or not. Just need it to increment quite simply.
@dkw15
That is the goal of what I am making, something to purely record page information and views, then update a table by one.
The rest would be excluding admins and logged in users, but that should be configurable.
That is the goal of what I am making, something to purely record page information and views, then update a table by one.
The rest would be excluding admins and logged in users, but that should be configurable.
That sounds like the kind of thing. That's something you're developing now? Count me in to try it out!!
I'd be interested in this feature, as well, if it's still something being considered for development.
I also needs hit counter for concrete5 5.7
did manage to find a solution?
did manage to find a solution?
Here the very simple page counter for a page type. It count all visitors exept admins.
Just create number attribute "page_count". Sign it to page type you'd like to count. Include this code somewhere in a page template.
If you want sort block PageList by most viewed pages you have to extend PageList's controller or make single page with custom page list.
Just create number attribute "page_count". Sign it to page type you'd like to count. Include this code somewhere in a page template.
<?php $c = Page::getCurrentPage(); $cp = new Permissions($c); $c = Page::getCurrentPage(); $page_count=$c->getAttribute('page_count'); if (!$cp->canAdminPage()) { $c->setAttribute('page_count', $page_count+1); } ?> <div><?php if ($cp->canAdminPage()) { echo 'This page was viewed '.$page_count.' time(s).'; } ?></div>
If you want sort block PageList by most viewed pages you have to extend PageList's controller or make single page with custom page list.
switch ($orderBy) { case 'chrono_asc': $this->pl->sortByPublicDate(); break; case 'most_popular': $this->pl->sortBy('ak_page_count', 'desc'); break; default: $this->pl->sortByPublicDateDescending(); break; }
Thanks for that.
Modified your code and made a FREE package for the marketplace.
Also works with v8, see attached.
Modified your code and made a FREE package for the marketplace.
Also works with v8, see attached.
Thanks Steevb! You rock!
Thanks a lot @theana27 for your code! it helped me a lot!
However, I couldn't get the pagelist sorting to work, I did all possible ways...
Can you help providing me the full controller.php for most popular PageList sorting?
Running version 8.0.1
Thanks in advance
However, I couldn't get the pagelist sorting to work, I did all possible ways...
Can you help providing me the full controller.php for most popular PageList sorting?
Running version 8.0.1
Thanks in advance
I have produced a really basic hit counter that counts EVERY page hit. It does not give individual page hits.
You're welcome to use it, however there is no support. See attached.
You're welcome to use it, however there is no support. See attached.
There is also a page stats package in the PRB that should be available soon. It is pretty cool.
If you are looking for detailed statistics, I would recommend setting up a Google Analytics account.
https://www.google.com/analytics/...
This block looks fairly complex and would require a substantial investment in time to recreate for 5.7.