AMREIN ENGINEERING SharePoint Web Parts   |   Office 365 Web Parts   |   Blog   |   Support   |   Search   |   About us   |   Home  


Sharepoint Web Parts  

2019/SE Modern Web Parts  

Digital Clock Webpart  

Alerts Webpart  

Event Manager Webpart  

Sitemap Webpart  

Stock Chart Webpart  

Stock Quotes Webpart  

Dilbert Webpart  

Mega Menu Webpart  

Quote of the Day Webpart  

Webpart Tabs Webpart  

"Spotlight On.." Webpart  

"Tip of the Day" Webpart  

Lightbox Webpart  

Page HeaderSolution  

Tabs & Accordion Webpart  

Weather Webpart  

Slideshow Webpart  

Currency Rates Webpart  

Media Player Webpart  

YouTube Player Webpart  

Map Chart Webpart  

Org Chart Webpart  

Tiles Webpart  

Chart Webpart  

Google Chart Webpart  

Hero Webpart  

News Tiles Webpart  

Cafeteria Webpart  

RSS Feed Ticker Webpart  

SQL Viewer Webpart  

Google Map Webpart  

Quick Poll Webpart  

Quick Survey Webpart  

Audio Player Webpart  

Geo Mapper Webpart  

SQL Chart Webpart  

Exchange Calendar Webpart  

Exchange Events Webpart  

Call to Action Webpart  

Quick Links Webpart  

Filter Webpart  

Image Rotator Webpart  

Navigator Webpart  

KPI Webpart  

Page Hits Webpart  

Picture Menu Webpart  

Timer Webpart  

Podcast Webpart  

SQL Bullet Graph Webpart  

User Spotlight Webpart  

List View Webpart  

Staff Directory Webpart  

Birthday Reminder Webpart  

News Carousel Webpart  

Team Members Webpart  

Christmas Webpart  

Classifieds Webpart  

Image Menu Carousel Webpart  

Timeline Webpart  

Banner Rotator Webpart  

AZ Index Webpart  

Blog Roll Up Webpart  

Discussion Roll Up Webpart  

Document Roll Up Webpart  

News Roll Up Webpart  

Task Roll Up Webpart  

Calendar Roll Up Webpart  

Quick Form Webpart  

Twitter Webpart  

Upcoming Events Webpart  

Welcome Webpart  

Color Calendar Webpart  

Image Carousel Webpart  

Metro Grid Webpart  

Goal Thermometer Webpart  

Swipe Gallery Webpart  

List Items Webpart  

List Rotator Webpart  

List Search Webpart  

Bullet Graph Webpart  

Accordion & Tabs Bundle  

Accordion List Webpart  

Tabs List Webpart  

Microblog/Chat Webpart  

Toast Notifications  

Vacation Planner Webpart  

Multilevel Tile Webpart  

Inspired Tiles Webpart  

Facebook Timeline Webpart  

File Explorer Webpart  

Zip Creator  

AEWebparts  

Web Part Bundle  

Web Parts by Category  

Microsoft Sharepoint Web Parts

Free SharePoint Page Hits Web Part


The AE Page Hits Web Part allows to display a page hit counter and/or other page related data.
It also can be used to display any metadata assigned to the "Pages" or "Site Pages" library as for example the "Likes" count, the author or editor or any other library column.

The Web Part can be used with Windows Sharepoint Services V3, MOSS 2007, Sharepoint 2010, Sharepoint 2013, Sharepoint 2016, Sharepoint 2019 and SharePoint Subscription Edition (both classic and modern pages).


SharePoint 2019/SE 'Modern' version »

Product Price     
Page Hits Web Part for SP 2010 Free download..
Page Hits Web Part for SP 2013 Free download..
Page Hits Web Part for SP 2016 Free download..
Page Hits Web Part for SP 2019 and SE Free download..
Web Part Installation Instructions download..
Deployment Instructions for SP 2019 and SE "modern" pages download..
Sharepoint Page Hits Web Part


Sharepoint Page Hits Web Part displaying page details


Sharepoint Page Hits Web Part displaying the page author


Sharepoint Page Hits Web Part displaying the Likes count


Installation Instructions:

  1. download the Page Hits Web Part Installation Instructions (PDF file, see above) 
  2. either install the web part manually or deploy the feature to your server/farm as described in the instructions.
  3. Please first add a new List column of type “Number” named PageHits to the Sharepoint page library that hosts the page where you will be going to place the web part:


  4. configure the following Web Part properties in the Web Part Editor "Miscellaneous" pane section as needed:

    • Template: 
      enter the template to be used to render the output. The following tokens are available:

      {hits}   (the total number of page hits so far)
      {since}   (the date the page was created)
      {hitsperday} (the number of page hits per day)
      {pageage} (age of page in number of days)
      {author} (the creator of the page)
      {editor} (the user who last editied the page)
      {author/photo} (the creator of the page, includes photo)
      {editor/photo} (the user who last edited the page, includes photo)
      {created}
      (the date the page was created)
      {modified} (the date the page was last edited)
      {likes} (displays the number of likes)

      Example 1:
      Page Hits: {hits}

      Example 2:
      <div style="width:200px;background-color:tomato;font:10pt Segoe UI;color:white;padding:6px"><font size=6>{hits}</font> page hits since {since}<br>Hits per day: {hitsperday}</div>



      Example 3:
      <div style="width:250px;background-color:#0078D7;font:12px Segoe UI;color:white;padding:6px">{hits} hits per day since {since}<br>Hits per day: {hitsperday}<br>Created: {pageage} days ago<br>Created by: {author} on {created}<br>Last edited by: {editor} on {modified}</div>


    • Since Date:
      by default the web part uses the page creation date for the "{since}" and "{hitsperday}" tokens.
      You can override the default setting by entering a custom date.
    • Active:
      activate or deactivate the Page Hit counter.
      Please note that this setting by default is turned off, so you will need to make sure to enable it.
    • Show Today's Hits:
      either show the number of hits since the 'Since Date' or only today's hits (by resetting the page hit counter every day at midnight).




Please enter a comment below if you have problems with the installation, want to give feedback or have suggestions for improvements:

User Comments Post a Comment 

MikeZz  
12/31/2013 05:28 
Hi Juerg,
I noticed that it updates the properties of the page file in the library. Does this mean that it only counts users who have edit rights to the page or does it count even those who only have Read or even just View level access?

2nd question, is there any way to trick it into counting views of a regular file in a library (Like Excel)?

Thanks again for the great response!
Juerg  
12/31/2013 12:19 
MikeZz,
the web part counts all page hits (even for users that do only have “read” or “view” permissions on the page).
The web part cannot be used to count the number of document views. However, you can turn on auditing via “Site Settings/Site Collection Administration/Site collection audit settings” where you can enable tracking for document views, edits etc.
MikeZz  
1/3/2014 18:37 
Hi Juerg,
I was testing this part on my test collection. When I use this part and your example template showing hits per day on any existing subsite page, it works as shown.

However, I created a brand new subsite and put it on that site's home page and the webpart shows the total hit's correctly, but not hits per day (Notice " {hitsperday}" is spelled out):

Here's the result:
26 page hits since1/3/2014
Hits per day: {hitsperday}

I've tried creating numerous new subsites and always with the same result.

Any ideas?
Juerg  
1/3/2014 18:52 
MikeZz,
there is a bug in the web part that causes it to not replace the “{hitsperday}” token if the page is younger than 24 hours. The problem thus will go away after after the page is older than one day.
We will fix this problem in the web part’s next release.
Juerg  
1/3/2014 19:01 
MikeZz,
we have now fixed the problem with the {hitsperday} token and pages being younger than 24 hours.
Please re-download the updated Zip file, extract the WSP file and then update the web part solution.
MikeZz  
1/6/2014 16:07 
Hi Juerg,
Were still on the same version but now I'm in a clean collection just created.... so I won't have any possible permission issues that I know of.

I put the page hits counter on a wiki page that inherit's permission from the collection.

I put a person in the Visitors Group (who have read rights to the page).
They get access denied.
I also have several other wiki pages with web part testing (like your clocks and list search) and they can see all those.
If I add them to the Contributors Group, they can view the page and the counter works.

Any suggestions? I'm wondering if this is somehow tied to the other permissions issue we saw where if I put a list view web part on a page which pointed to a list I didn't have access to, the entire page was denied access.

Regards, Mike
MikeZz  
1/6/2014 18:09 
I was talking to our admin about the permission blocking the page. Can you email me some background of how the part works, if it trys to call anything hidden or look for specific permission types, groups or names?

Maybe explain a little about how the part updates a column in a list if the person only has read access.

I don't know much about Sharepoint Infrastructure from an IT standpoint, but I do use SPD and know that in workflows you can "Impersonate" System permissions... maybe that's how you get around it?

Thanks again!
MikeZz  
1/6/2014 18:16 
One side comment that I noticed now that my page is more than 24 hours old....

I added the counter to a page that has been around since last year but the counter was added last week.

The "Since" Date seems to be the "Created Date".

So the average hits per day = "Hits since counter reset" / "Age of Page since Creation".

In our case, we had 50 hits in two days but my stat was something like 0.14 hits per day.

Is this just a limitation of the part based on how it works? or can there be a way to use a date we type into the web part properties so it doesn't mislead people? Maybe then you could use that date to also calculate the correct hits per day.

Thanks again
Juerg  
1/7/2014 14:55 
MikeZz,
we were able to fix the “access denied” problem for users that do not have write permissions on the page library.
We also added the new “Since Date” web part setting that allows you to override the page “Created” date (used by the “{hitsperday”} token).

Please download the updated Zip file, extract the WSP file and then update the web part solution.
MikeZz  
1/23/2014 16:59 
Hi Juerg,
We have 1.0.4 in production now but it seems like the sub-site bug is still there.... We get this message directly between the Title and the colored box. Is consistant on all our farms and was in QA... but unfortunately I never re-tested on a subsite before going live :(.

"Error: Incorrect function. (Exception from HRESULT: 0x80070001) "

Any help is appreciated.
Juerg  
1/23/2014 17:10 
Mike,
please download and install version 1.0.5 (the problem with placing the web part on a subsite was fixed in version 1.0.5).
Lynley  
2/14/2014 20:52 
Hi, Juerg,

Can you tell me if this functionality will work for list items as well? We're struggling to find a reliable hit counter for list items (currently using workflows that are not super reliable).

Thanks so much for sharing your great work!
Juerg  
2/16/2014 19:21 
Lynley,
the web part actually only works with pages where it increments the counter each time a user visits the page.
Are you looking for a counter that would be embedded on the “Display” form of a list to increment the count each time a user opens the “Display” form of the list item ?
Duski  
3/27/2014 09:56 
Hi.
I tried to install and use your webpart version 1.0.5 into our SPPS 2013 Foundation site. Installation seemed correctly done, but after webpart's inserting and activating into the page, the HitCounter doesn't work with an error message "Update Error: Value cannot be null.Page Hits: 0".
Any suggestions ?
Thanx in advance. Duski
Lucian  
3/27/2014 10:45 
I have the same issue as Duski. "Update Error: Value cannot be null.Page Hits: 0".
Juerg  
3/28/2014 12:34 
Duski and Lucian,
the problem arises because the default.aspx web part page is not part of a pages library but lives on its own.
We thus proceeded to have the Page Hits web part now also support the default.aspx page.

Please download the updated Zip file, extract the WSP file and then update the web part solution.
sandeep  
5/9/2014 00:24 
when i try to add webpart to my sharepoint 2013 site its says
"Cannot import Ae page hit webpart "
?
can you help me with this ?
I have deployed 2 other amerigroup webparts on my site and they work fine but this web part shows the above problem?
Please help me out
Juerg  
5/9/2014 15:03 
sandeep,
the web part should work fine on Sharepoint 2013.
Did you use the WSP solution to deploy the web part ?
sandep  
5/9/2014 15:23 
Yes i used wsp to deploy the web part .
i did every thing according to the documentation . but when i try to add webpart it shows cannot import webpart .
sandeep  
5/9/2014 15:24 
Web part is successfully deployed and i can see it in features and central admin .Web part is shown in webpart gallery and the only problem is when i try to add it to the page .
Juerg  
5/9/2014 16:48 
Sandeep,
the deployment uses a Sharepoint timer job to deploy the solution to all web front end servers.
This indeed might add some delay.
Abbas  
6/26/2014 12:00 
Hi Juerg,

Is it possible to use this web part for working with list items?
We need to find a reliable hit counter for list items.
1- We you looking for a counter that would be embedded on the “Display” form of a list to increment the count each time a user opens the “Display” form of the list item.
2- We need also to use this hit counter in "list view"
3- We need to use this hit counter for news, blog items, wiki items and other list or libraries.
How can we use this nice web part?
thanks & regards
Abbas
LilS  
7/24/2014 19:18 
Works great on a published page, thanks. Will the Page Hits web part work in a SP2010 blog? If so how?
Juerg  
7/24/2014 19:33 
LilS,
yes, just add the "PageHits" column to the "Posts" list and also add the web part to the blog post detail page.
KY  
7/30/2014 08:00 
Juerg, is there anyway we can show the page hit per day column on the site page instead of just the total page hits?
Juerg  
7/30/2014 13:27 
KY,
do I correctly understand that you would like to display the average hits per day as opposed to the total hits so far ?
If yes, just use the {hitsperday} token in the web part's "Template" setting as for example:

Hits per day = {hitsperday}
tugcan  
8/19/2014 10:42 
Hi Juerg,

I installed the webpart into a wiki page and it worked normally, but after that all the users except me couldn't access to the page. After i deleted the webpart, users could access to the page again. Is it because this webpart's permission is granted somewhere different than site permissions?
Juerg  
8/19/2014 15:40 
tugcan,
the web part uses the accont assigned to your Sharepoint's applcation pool (by default this is the "System Account") to update the "PageHits" column. Can you check if the account that you assigned to your application pool does have write permission on your wiki page library ?
Zaid  
9/22/2014 09:00 
We are using the "hits per day" counter to know per day hit for certain pages in our portal. Since its internal portal & our office is open 5 days a week. But the hits per day divides total number of hits with total number of days (e.g. 30 days in a month), which includes week ends as well. Because of which instead of dividing total number of counts with 5 working days (in a week), it is dividing with 7 days (in a week including week ends).
So can we have an option to remove certain days from count e.g. omit Saturday ,Sunday for most of the countries and omit Friday, Saturday for gulf countries, to get the accurate number of hits per day.
Juerg  
9/23/2014 14:47 
Zaid,
we have now added the new "daysperweek" option (to be entered into the web part's "Options" setting) to correct for the "Hits per day" number.

Example:
daysperweek=5

Please download the updated Zip file, extract the WSP file and then update the web part solution.
Duski  
12/9/2014 13:09 
Hi, Juerg.
we installed Your PageHits webpart into our SPPS 2013 Foundation site and it works fine. But the number of counted pagehits is unreal - there are thousands of pagehits on inactive pages. How can we fix this problem ? Thanx in advance.
Juerg  
12/15/2014 14:46 
Duski,
when you create a new page, is the hit count then correctly starting with „1“ or does it have a random value right from the beginning ?
DIVINE  
2/12/2015 16:45 
Please i cant configure the page hits
3.Please first add a new List column of type “Number” named PageHits to the Sharepoint page library that hosts the page where you will be going to place the web part:

i dont no where to configure the sharepoint page library
Juerg  
2/12/2015 17:55 
Divine,
it’s the „Site Pages“ library in your site which hosts the Sharepoint Wiki pages.
Ravi  
2/27/2015 02:10 
Hi,
Thanks for the nice webpart. I don't have any issues in retrieving the Page Hits. but, I tried to add this webpart in to a webpartzone in the Page layout that is a default layout for all pages in my sharepoint 2013 on premises site.. This didn't work as expected. The page Hits doesn't get updated
Any thoughts ??
akeem  
4/6/2015 20:07 
hello, great web part but i notice i can't reset the page hits. when I hit reset it still shows the number of page hits from previous days. any suggestions?

Also, where do i create the custom list? do i create it in the all site content page
Alex  
4/7/2015 10:03 
akeem,
can you set the web part into trace mode and send us the output for inspection? Please set trace=1 under Options to generate the output (Edit Pane > Miscellaneous > Options).
Christopher  
6/23/2015 14:40 
Goo Day,

First off thank you for the web part.
Is it possible to count only user per session?

Thanks again for the cool web part.
Juerg  
6/23/2015 18:20 
Christopher,
this is not possible (eg. the web part is counting every page view).
Fernando  
8/5/2015 16:39 
HI, what about the installation on a farm?, it needs to be installed on all go them or only on the front end?

thanks
Fernando
Juerg  
8/5/2015 16:44 
Fernando,
you just need to add the WSP solution on one of your Sharepoint web frontend servers.
You then can choose in Central Administration, to which web applications you want to deploy the solution.
Murdock  
9/28/2015 18:42 
I cannot get the "Since Date" under Misc to work properly. The Hits per day is aways since today.
mm/dd/yyyy format?
Juerg  
9/28/2015 20:03 
Murdock,

the format to be used is

m/d/yyyy

Please note, that your custom date (as entered into the “Since Date” setting) will only be reflected after you leave the web part edit mode.
Atema  
11/12/2015 16:44 
Hi Juerg,

We're very happy with this (and other) Amrein Solutions!
I've two questions:
1) Is it possible to only count unique hits?
2) We use the webpart in the announcement items. So it would be nice when {since} could be the same as 'created'. Is this possible?

Thank you in advance.
Juerg  
11/15/2015 14:12 
Atema,

1. What exactly do you mean by “unique hits” (incrementing the count only once per user and page) ?
2. Do you mean that you embedded the web part in the Announcement List’s default item form ?
Shawn  
1/5/2016 14:50 
Will this web part work on a 64 bit server?
Juerg  
1/5/2016 19:12 
Shawn,
yes, it is compatible with all servers and operating systems.
Sam  
1/11/2016 13:05 
Hi there,

Just wndering how to display the PAGE HITS via a masterpage etc. ? so it can be visible on all the pages throughout a web application / site collection etc. ?

Look forward to your reply.

Thanks

Sumit
Juerg  
1/11/2016 15:07 
Sam,
we do not recommend inserting the web part into the master page since it then would try to update the page counter for each page that uses the master page. Since the web part stores the hit count in the “PageHits” column of the page library that contains the page, you would first need to make sure to include this column in all your page libraries across the farm.
Sam  
1/11/2016 15:19 
Thanks Juerg,

I kind of gathered that after posting my comment, that this webpart works of a library column. What should be the best method to achive this in case of a large Intranet for example. This may have a number of site collections with Root sites and a number of sub-sites etc. It'll be some job to implement a webpart based solution across the implementation in that case?

Thanks
Juerg  
1/18/2016 19:54 
Sam,
the web part is indeed not well suited for multiple site collections containing lots of sites. In this case we recommend to use the Web Analytics Service Application for SharePoint (Sharepoint Server only).
Logan  
6/29/2016 16:30 
Hi,
I have it up and running and it's great! Is there a way to make the web part smarter? Can it show who accessed the page, or at the very least, how many non-members have been there? I would like to know who is actually using my page.

Thanks!
Juerg  
7/1/2016 15:43 
Logan,
we have now added the new option to have the web part log the users into the page library’s “Audit” field.

To enable the option, please just add a new column named “Audit” of type “Multiple lines of text”. Please make sure to also set the “Allow unlimited length in document libraries” option for that column.

Please download the updated Zip file, extract the WSP file and then update the web part solution.
Jeeva  
11/24/2016 07:33 
Hi Juerg,

We have installed this webpart and working fine.
Can we set permission to this webpart , like only Approvers and Designer group people can see this hit counter webpart.
Juerg  
11/24/2016 17:38 
Jeeva,
you actually can use the web part’s “Target Audiences” setting (“Advanced” section”) to make the web part visible only to the members of the group(s) entered here.
Calico  
4/19/2017 17:14 
Hi Juerg,
Is there a way or a web part to capture and display the top 10 sites for a user?
thank you!
Juerg  
4/19/2017 18:04 
Calico,
unfortunately Sharepoint does not keep track of the number of site/page visits per user (it only keeps the total count for all users).

If you just need the accumulated counts, then you might have a look at the SP 2010 “Web Analytics” web part (please see for example https://wonderlaura.com/2011/10/26/your-sites-most-popular-content-web-analytics-web-part/ )

If you need a detailed count per user, then the only solution would be a custom control embedded in your master page which logs every page access per user.
Chuck Mitch  
5/19/2017 02:10 
Is it possible to upload this to Office 365 SharePoint Online?
Juerg  
5/19/2017 12:31 
Chuck,
we currently do not have an Office365/Sharepoint Online version.
However, we might decide to create one later this year.
min han  
7/17/2017 09:34 
Hi Juerg,
Thanks for the great web part.
How do I reset the hit counter?
Juerg  
7/17/2017 10:57 
Min Han,
please navigate to the open the page library of the page which contains the Page Hits web part. Please then open the page for editing and set the “PageHits” form field back to zero.
Min Han  
7/26/2017 10:00 
Thank you for your response.
We are using Sharepoint 2016.
Is there a way to reset the hitsperday token daily rather than daily?
I want the number of hits to be reset per day rather than the average number of hits per day.
Clicks reset at 00 o'clock
Can you help me?
Juerg  
7/26/2017 13:42 
Min,
we have now added the new „Show Today's Hits” web part setting which automatically resets the page hit counter every day at midnight.

Please download the updated Zip file, extract the WSP file and then update the web part solution.
min han  
7/28/2017 03:12 
Hi Juerg
I tried to apply the new wsp file.
I made the test after the new setting. After 24 hours, the counter is set to 1, but the counter does not go up after that.
Is my setting wrong?
I set it up to see the total counter and the today counter reset every 24 hours.
-------------------------------
Template )
<div style="width:200px; height:60px; background-color:#bdf; border: 2px solid #1bf; font:10pt Segoe UI;color:3d3a3a;padding:6px; border-radius:0.7em; -moz-border-radius: 0.7em; -webkit-border-radius: 0.5em;"> <font size=6> Total : {hits}</font> <br><span style="float:right; padding-right:6px;"> Today : {hitsperday} </span> </div>
Since Date)
2017-07-26 am 12:00:00
Active Check - enable
Show Today`s Hits Check - enable
-------------------------------
What went wrong? Or is it a modified program bug?

thank you!
Juerg  
7/28/2017 19:00 
min han,
we indeed introduced a bug which prevented the page hit counter to increment when being set to “Show Today’s Hits”.
This has now been fixed.

Please download the updated Zip file, extract the WSP file and then update the web part solution.
CarlR  
9/21/2017 10:58 
Great web part - just installed into our SP2013 Farm. All working ok except it seems to count each page view as 2 so it's reporting twice as many hits as we actually are?
Juerg  
9/21/2017 11:30 
Carl,
do you observe this issue both when using Internet Explorer and Google Chrome ? Also, is the "Minimal Download Strateg" site feature (Site settings/Site Actions/Manage site features) activated or deactivated ?
CarlR  
9/21/2017 12:27 
Thanks for the fast response Juerg. We Experience this on our main landing page (in both of our test farms), It happens in both IE and Chrome. Minimal Download is set to off. Tried setting to On but get same result.
After further testing this only happens on the main landing page, not on a clean sub-site.
CarlR  
9/21/2017 12:40 
Also is there anyway to have page hits recorded for different pages at the same time? For Example, if i have 3 pages all in the same library, I can only currently record the hits for only 1 of those pages?
Juerg  
9/21/2017 12:41 
Carl,
could it be that some element on your home page forces the page to refresh when opening the page (eg. displaying it twice in quick succession) ?
CarlR  
9/21/2017 12:52 
Ah, We have an image slider on the homepage which I think does an auto refresh after a page load I bet that's the issue.
CarlR  
9/22/2017 11:40 
Is there anyway to have page hits recorded for different pages at the same time? For Example, if i have 3 pages all in the same library, I can only currently record the hits for only 1 of those pages?
Juerg  
9/22/2017 12:10 
Carl,
in order to record the hits for a page, you need to place the web part onto that page. You can hide the web part on the page if you just want to record the hits.
Gagas  
10/24/2017 06:10 
how to start number of hits from specific value, my page has launch for several months and I don't want total hits to be reset
Juerg  
10/24/2017 16:17 
Gagas,
please just set the “PageHits” column to a non-zero value.
deb  
5/30/2018 02:09 
Hi Juerg, does this web part work in a blog site? Our users want to see how many people have looked at the posts.
Thanks
Deb
Juerg  
5/30/2018 11:09 
Deb,
yes, just

- add the „PageHits“ column (of type „numeric“) to the „Posts” list.
- add the web part to the Blog Post detail page:


Raman  
7/24/2018 06:52 
Hi, {Hitsperday} means hits of that particular day or it counts the average hits ?? Please explain.
Juerg  
7/24/2018 10:33 
Raman,
the "{hitsperday}" placeholder displays the avarage number of hits per day (since the counter was started).
Raman  
7/25/2018 13:30 
Thanks for the update! What if i want to display daily page hits too??
Juerg  
7/25/2018 13:38 
Raman,
you only either can display the number of hits today or since the counter was started (depending on the "Show Today's Hits" web part setting).
Raman  
7/27/2018 07:25 
Ok! Got it! Thanks for the help.
Raman  
8/3/2018 08:49 
I may be wrong but after adding this solution and webpart, transaction logs created are in GB. Is it so ?
Juerg  
8/3/2018 11:23 
Raman,
most probably not, unless you placed the web part on heavily frequented pages visited by several 1,000 users (each page hit updates the corresponding list entry in the Pages library).
Raman  
8/4/2018 08:56 
Actually yes. its on my homepage which is showing 110000+ in 15 days. What should i do for the logs .? any idea?
Juerg  
8/6/2018 20:05 
Raman,
Sharepoint keeps all data in SQLServer, so every update (as a page hit in this case) creates an entry in the SQL Server transaction log.
You might want check out the below article on how to handle fast growing transaction logs:
https://www.computerworld.com/article/3009448/database-management/avoiding-ginormous-transaction-logs-with-sharepoint-databases.html
Heste  
9/19/2018 15:36 
I accidently clicked on the 'Reset counter' on top of the web part. Is there a way to recover that? I can remember the number it was when I clicked Reset.
Juerg  
9/19/2018 16:26 
Heste,
to restore the counter, please navigate to the corresponding Site Pages library and (via the page's "context menu/.../Properties") open the page edit menu and fill in the previous page count.
Raquel  
1/29/2019 21:40 
I have a lot of problems for SharePoint 2013. I tried install with several users and finally with admin local in the SharePoint server and I got this message. Object reference not set to an instance of an object. AEPageHitsWebpart.wsp the solution installation failed. I couldn't.
Juerg  
1/30/2019 14:35 
Raquel,
please make sure to run the install.bat file from within a CMD prompt lauchned via the "Run as administrator" option and also make sure to be logged in as a Sharepoint farm administrator.
Heste  
4/2/2019 11:20 
I have installed the Hit counter on SharePoint 2013 site on several sub sites. Each month the client went and reset the hit counter on each page where it was installed. But the last 2 months a problem occured. When they hit 'Reset counter', it shows the Hits: 0 in edit mode. But the moment they click on 'Save', it shows the previous hits. Why is this happening?
Juerg  
4/5/2019 10:22 
Heste
please open the page containing the web part and then append

?aereset=1

to the page URL in the browser’s address bar to force resetting the counter for that page.
Cinda Goff  
8/2/2019 15:03 
We have been trying to use an audience so only a few people can see the web part on the page but when I set an audience, it appears to only log hits by members of the audience. Is this how it works or am I missing something else? Thanks. Cinda
Juerg  
8/2/2019 15:28 
Cinda,
the web part’s „Target Audiences“ setting will disable the web part for all users not belonging to your target audiences, so no page hits will be recorded for these users.
To simply hide the web part from view (and thus have the web part record all page hits) please set the “Appearance/Chrome Type” to “None” and then also “Minimize” the web part via its web part menu.
Bin  
12/12/2019 02:48 
Why {hits} and {hitsperday} are same result.I set 3 days ago.
Active Check - enable
Show Today`s Hits Check - enable
Juerg  
12/12/2019 10:49 
Bin,
this is by design.
If „Show Today’s Hits” is enabled, then the page hit counter will be reset every day (so there is no running total available beyond one day).
Bin  
12/13/2019 04:20 
Thanks Juerg
How to show total and hit per day same time?
Juerg  
12/13/2019 11:51 
Bin,
by entering both the „{hits}” and the “{hitsperday}” placeholders:

{hits} page hits <br>Hits per day: {hitsperday}
Jasmin  
1/30/2020 07:00 
Hi,
I have the webpart added to three of my pages with exactly the same settings. On one page it works fine, on the other two the hits per day value is the same as the total. I unchecked "Show Today's Hits" just yesterday and I've tried a few different "Since Dates" but nothing seems to make the calculation work correctly.
Do you have any idea what the problem could be?
Thank you!
Juerg  
1/30/2020 17:46 
Jasmin,
since you only yesterday unchecked the “Show Today’s Hits” setting, the total hits and the hits per day are the same since only one day has elapsed since.
Jasmin  
1/31/2020 08:14 
Hi Juerg,
thank you for your answer.
I checked the sites again this morning, but nothing has changed. The "hits per day" number is still the same as the "total" number.
Nathan  
6/4/2020 08:36 
Hi Juerg - just carrying this question over from thr previous blog

You mentioned we can manipulate this webpart to achieve the following. Can you explain how i would do this to achieve the following outcome.

i want this webpart to display the number of days which have past a specific date. Can this be done?
Nathan  
6/4/2020 08:42 
Just to add i have tried the following in the template: <div style="width:250px;background-color:#0078D7;font:12px Segoe UI;color:white;padding:6px">Past review: {pageage}</div>

and

applied a 'since date' of 01/06/2019 00:00:00

however the webpart fails to display the number of days since 01/06/2019 00:00:00

grateful for any advice you can provide
Juerg  
6/4/2020 12:36 
Nathan,
can you quickly check the web part's version by opening the web part’s tool pane and looking it up at the top ?
It should read V1.0.15
Please update the web part if you have an older version.
Nathan  
6/4/2020 13:20 
Looks like we still have Version 1.0.14 installed so i will update and comeback to you.

thanks
Nathan  
6/19/2020 08:57 
We now have Version 1.0.15 installed.

To recap, what i am trying to achieve is to get this webpart to show how many days have past from a custom date field (titled Next Review). Can you help?

In the template field i have placed the following: <div style="width:250px;background-color:#0078D7;font:12px Segoe UI;color:white;padding:6px">Past review: {pageage}</div>

and in the Since Date field: {Next Review}

however i am getting an error saying: Since Date: This date-time value is invalid.

grateful for any advice you can provide. thanks

Juerg  
6/26/2020 13:35 

Nathan,
we have now added the option to embed any page column in the web part's "Template" setting.
In your case you thus would use the below template:

<div style="width:250px;background-color:#0078D7;font:12px Segoe UI;color:white;padding:6px">Next review: {Next Review/days}</div>

The "/days" qualifier formats the date as a time difference (number of days) between today's date and your specified column's date.

Please re-download and then update the web part.

M  
5/28/2021 10:09 
Hello.
What time does "Show Today's Hits:" reset?
Please let me know if it is set to reset at a fixed time.
Juerg  
5/28/2021 15:13 
M,
the web part resets the counter at midnight.
M  
6/1/2021 07:32 
Juerg,
Thanks for the help!
M  
6/2/2021 10:31 
"Show Today's Hits" is not reset.
"Since Date" is 5/26, but the {since} tag is updated every day.
↓Share trace=1 information.↓
================
WP Editing=False
DesignMode=False
Option trace=1
Site URL=http://XXXXXXXX/XX/XXXXXXXX
Web URL=http://XXXXXXXX/XX/XXXXXXXX
ListItem URL=/XXX/XXXXXXXX/SitePages/Home.aspx
Page URL=/XXX/XXXXXXXX/SitePages/Home.aspx
User=XXXX\systemuser
Page item accessed..
Item ID=1/Page Library=XXXXXXXX
Hits=126
ResetDate=2021/06/02 0:00:00
Page Created=2021/06/02
Page age (days)=0 ..updated
================
Juerg  
6/2/2021 11:53 
M,
if you switch the web part to "Show Today's Hits" you will need to wait until the next day where the web part then resets the counter.
M  
6/3/2021 02:35 
Juerg,
Thank you for the reply.
It's been a week since I checked "Show Today's Hits".
"ResetDate" and "Page Created" are updated daily. Is there any possible cause?
"Page age (days)" also does not change from "0".
Juerg  
6/3/2021 10:26 
M,
the web part should reset the page counter every day when using the "Show Today's Hits" setting.
Can you describe the issue you are observing (as eg. the page count keeps increasing each day) ?
M  
6/4/2021 04:12 
Juerg,
The problems I am facing are:
---------------------
"Show Today's Hits": More than a week has passed since I checked, but the counter has never been reset
It does not become "Hits = 0"
"Reset Date": Change to the current date every day
"Page Created": Change to the date of the day every day (I installed it on May 26th, but it is supposed to be installed on 6/4)
"Page age (days)": Does not change from 0 no matter how many days pass
---------------------
M  
6/4/2021 04:49 
Is it a specification that "Since Date" is not reflected in "Page Created" when "Show Today's Hits" is checked?
Juerg  
6/5/2021 11:36 
M,
the {since} indeed shows today's date if ""Show Today's Hits" is selected.
Are you sure that the hit count does NOT reflect today's hits ?
Only if you are the first page visitor after midnight, it would display "1", otherwise it should reflect the number of page visits since midnight, triggered by other users visiting the page.
M  
6/8/2021 04:22 
>Are you sure that the hit count does NOT reflect today's hits ?
Yes.
After midnight, the hit counter does not change to "0" or "1".
Do you know the cause?
Juerg  
6/8/2021 19:20 
M,
can we schedule a screen sharing session to investigate the issue ?
You can send us an invitation via your preferred screen sharing tool to [email protected]
M  
6/10/2021 07:10 
Juerg,
I'm glad proposal, but it does not receive because it is difficult to speak in English.
Also When information to help you solve is found, you write to this board.
Thank you.
Juerg  
6/10/2021 11:33 
M,
can you indicate your Sharepoint version (2010/2013/2016/2019) ?
In case of SP 2019: are you using the web part on a "modern" or on a "classic" page ?
M  
6/11/2021 09:53 
Juerg,
I am using SharePoint 2013.
Abbas  
2/7/2022 12:43 
Hello Juerg
How can I have your example2 template and its css in a modern page?
I mean :

<div style="width:200px;background-color:tomato;font:10pt Segoe UI;color:white;padding:6px"><font size=6>{hits}</font> page hits since {since}<br>Hits per day: {hitsperday}</div>

The configuration of this web part in modern pages is almost difficult for me.

regards,
Abbas
Juerg  
2/7/2022 13:03 
Hi Abbas,

just configure the web part as described on our web site at /apps/chapter.asp?Q=484  
You simply need to add the “template” setting to the “Configuration” as eg.

template=<div style='width:200px;background-color:tomato;font:10pt Segoe UI;color:white;padding:16px'><font size=6>{hits}</font> page hits since {since</div>
Abbas  
2/7/2022 16:04 
Hello Juerg

Vielen Dank!

Many Thanks for your kindly support.
It works great

Regards,
Abbas



 
© 2024 AMREIN ENGINEERING AG
  RSS Feed   
We are very satisfied with the ease of implementation of your products and your support.

Peter Hopkinson, Working Technology Pty Ltd


This web part is available for:
SharePoint 2010
SharePoint 2013
SharePoint 2016
SharePoint 2019
SharePoint SE
SharePoint 2019 'modern'
SharePoint SE 'modern'
Office 365