Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Morning, i have installed your package and added the DataType etc.. but the counter is not working and the database table has no entries
Did you place the code given on the project page in your view?
Thanks for the quick reply, yeah i have added: but it is
Hi David, are you able to paste all code in your view?
This code should work:
That code should output a number that increments each time you reload the browser.
Are you able to find a database table named UIncrement_Counter in the database? Can you check your log to see if it there are any errors?
What you have just sent works.
but what is the need for this one
Is this just to do sessions instead of page views?
Sweet! The IncrementSession creates a session for the user to prevent the counter to increment every time the user navigates back to the same node, or reloads the page.
You can debug this by clearing your cookies and the counter should increment one time per cache cleaning, or if you have two computers the counter should increment one time per computer.
Thanks That was brilliant
Sorry one last question is there a quick way to block internal work traffic from this counter?
You could probably do something like this:
if (HttpContext.Current.Request.Url.Host.ToLower() != "localhost")
or replace localhost with you dev domain.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted