Drupal Core Module - Statistics


Statistics module


If you are looking forward to add a counter for page views, you can simply used the Drupal core Statistics module.

This is a very simple module and provide you will a count attached to your content (at the end) showing how many time the content was accesses.

Note: It does not show any other information.

To enable the module:

You simply need to enable the module from 

Home > Administration > Extend (modules) 

Enable the 'Statistics' module.

Once enabled simply go to   

Home > Administration > Configuration >  System > Statistics

Check the "Count content views"

You will need to set the permissions for the same for the Statistics modules from

Home > Administration > People > Permissions

Search for the 'Statistics' section and enable "View content hits" for Anonymous User. This automatically allows everyone to see the hits on the pages.

Any thing related to "Administer Statistics" should be left for "Administrator" only.

Save the permissions.

Now your content should show number of hits to the pages. If hits are not showing then probably you are getting the cached pages.

Go to  Home > Administration > Configuration > Performance

Run "Clear all caches" 

You should get to see the hits now.

 

Main category

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
13 + 5 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Address

OpenSourceCook.in
"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions