Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > Web Analytics doubling page views View modes: 
User avatar
Member
Member
JonathanL - 2/28/2011 10:58:51 AM
   
Web Analytics doubling page views
Hello everyone, I've got a real problem with Web Analytics doubling page view on some of my webpages which have custom webparts/controls on them.

I've figured out that they're probably being doubled because of the page life cycle.
The post back load is logging a hit and then the page load is logging another hit.

I've looked through the Kentico code and cannot find any reference to LogHit which has PAGE_VIEWS as the first parameter. So I'm guessing it must be coded within the CMS WebAnalytics dll.

Has anyone else come across this problem? Anyone got any ideas on how I can fix this?

Thanks in advance

Jonathan

User avatar
Member
Member
JonathanL - 2/28/2011 10:59:48 AM
   
RE:Web Analytics doubling page views
I forgot to add, we're using Kentico V4.0

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/9/2011 11:43:45 AM
   
RE:Web Analytics doubling page views
Hello,


Do you log the hits by a custom code in the custom web parts? If so, it could be the issue which you have mentioned - that it goes twice through the code of web parts.

If you do not use special web part properties, you could use the User control web part for your controls instead of registering them as new web parts (Adding custom code to the Portal engine page). Then it uses the standard ASP.NET life cycle.

Otherwise, you could add a condition to your web part before you log the hit so that it would fire the method only once.


Best regards,
Helena Grulichova