Page 1 of 1

Using Hitcounter with CGBlog

Posted: Tue Jan 13, 2015 5:17 pm
by blast2007
Hi all,
I'm trying to set a counter for my pages but I stumble upon this problem, only for my homepage.

My homepage has

Code: Select all

{CGBlog number="3"}
tag inside only. This shows summaries (first 25 words) of last 3 article of my blog.

Putting

Code: Select all

{hitcounter}
tag on page footer template I got visits counts of my homepage, but if someone click on an blog entries, showing details of my blog article, the counter doesn't change: it shows always the same value of homepage.

I would like to count also blog entries access even if the page is always the same (homepage). Pretty URLs is active on my site.

How can achieve this? Any hints?
Thanks and regards
b.

P.S. I have already search in forum articles (like http://forum.cmsmadesimple.org/viewtopi ... =4&t=71250) but it doesn't works for me...

Re: Using Hitcounter with CGBlog

Posted: Thu Jan 15, 2015 11:57 am
by blast2007
... bump ...

Re: Using Hitcounter with CGBlog

Posted: Thu Jan 15, 2015 12:05 pm
by Rolf
Never used the module... But what first comes in my mind is canonical urls. Do you have this set correctly for the detail page? If not both urls are the same.

Re: Using Hitcounter with CGBlog

Posted: Thu Jan 15, 2015 12:58 pm
by Jo Morg
blast2007 wrote:How can achieve this? Any hints?
The tag has to be used in the summary and(1) detail templates, and you should read the module's help thoroughly: there is all you need to know about how to make the counter link to a particular entry.

edit:(1) - actually the module counts hits while displaying so you shouldn't use it in summary templates. My bad!

Re: Using Hitcounter with CGBlog

Posted: Thu Jan 15, 2015 3:12 pm
by blast2007
The main problem is where to use the tag for both plain pages and for CGBlog entries. If I use it in detail template of CGBlog It won't count plain pages hits and vice-versa.
Jo Morg wrote:
blast2007 wrote:How can achieve this? Any hints?
The tag has to be used in the summary and(1) detail templates, and you should read the module's help thoroughly: there is all you need to know about how to make the counter link to a particular entry.

edit:(1) - actually the module counts hits while displaying so you shouldn't use it in summary templates. My bad!

Re: Using Hitcounter with CGBlog

Posted: Thu Jan 15, 2015 3:18 pm
by Jo Morg
blast2007 wrote:The main problem is where to use the tag for both plain pages and for CGBlog entries. If I use it in detail template of CGBlog It won't count plain pages hits and vice-versa.
It will, just need to use different unique sets of identifiers (keys) in each.