Using Hitcounter with CGBlog

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Using Hitcounter with CGBlog

Post 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...
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: Using Hitcounter with CGBlog

Post by blast2007 »

... bump ...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Using Hitcounter with CGBlog

Post 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.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Using Hitcounter with CGBlog

Post 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!
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: Using Hitcounter with CGBlog

Post 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!
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Using Hitcounter with CGBlog

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”