Support » Plugin: Google Analytics Post Pageviews » Great and simple way to integrate Google Analytics for read counts

  • I was using earlier Count per day but it was bloating my database and reducing server performance badly resulting in much server cost. My site is a short story club which has more than 30,000 writers (with contributor access) and many readers. Every read was resulting in accessing huge database; it means multitude of write requests to database in a second. Moreover I was using Vaultpress for backup so every database update was triggering query to Vaultpress as well. I disabled this plugin a year ago and lost many writers as they were unhappy to not see reads of their stories.
    But then after evaluating many plugins, I found this plugin. It does exactly what I wanted – get data from google analytics, cache it for specified time and provide easy interface to display reads in theme. I really thank the writer of the plugin.
    However I wish to have an option to disable reads in posts admin menu. It may be good for single or fewer members site but definitely resource hungry option for big site. I had to comment code for this extra column in post admin area.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author maximevalette



    Thanks for your kind words, it’s awesome that you found my plugin useful 🙂

    About the column, you should be able to disable it in the Display settings at the top of the view.

    Kind regards

    Thanks maximevalette for your reply. If you are referring to disable columns check-box in wordpress screen options, this solution won’t help me as my site is multi-members (multi-contributors) and it’s impractical to expect that all logged-in users would disable this option. But it’s not an issue for me as I could locate the code in your plugin to disable the filter and the action that add extra column.

    I face different issue: There are four type of page/post reads values I observe in 3-4 days of trial (‘Cache time’ is chosen as ‘One Day’):

    (i) correct reads value – no issues, most of posts are showing correct reads
    (ii) default reads – in my case default value is set to ‘Unavailable’- hardly one or two instances where I found this value
    (iii) 0 (Zero) – mainly new posts. So I believe it’s correct reads as google itself may not have updates
    (iv) blank (nothing is printed/returned by php function) – I have no Idea about this case. I found even old posts that showed correct reads a day ago show blank; and the frequency of such instances is significant.

    I have few suggestions to make plugin more robust. I tried reading your code but pardon me for lack of my technical knowledge, I couldn’t understand it much. So it may be possible that my suggestions are already in.

    (a) Is there possibility not to update earlier reads value of a post if google API returns no-value/error? In this case plugin continues to show earlier reads value for a post. Additionally, in case of no-value or error return of google API, perhaps not to set ‘time to refresh’ for that post reads value so that in the subsequent php function call to get reads, plugin again tries to request to google.

    (b) Current option ‘start date for the analytics’ is a good feature. Nonetheless if we want to show total reads, obviously this value should be start of the analytics account. And perhaps in this case google API response may take more time or load google server more for the latest published posts. I think it’s good idea to also provide alternative to fetch reads from the publishing day of the post.

    I know I am asking too much from a free plugin. But it’s the plugin that I have been desperately looking for. Are you planning pro-version? or is there any? Anyway I’ll pay/contribute for this plugin after couple of weeks trial.

    PS: My website is on WP Engine and I am using there inbuilt cache. I don’t mind refreshing WP Engine cache manually everyday. Anyway I see that everyday value of reads are updated without manually refreshing the WP Engine cache

    Many thanks and best regards,

    Plugin Author maximevalette



    Thanks for your post, sorry for the delay I had a lot of work lately!

    To answer your questions:

    0. The blank value is probably when some invalid data was saved into the cache and the number formatting doesn’t return anything (since it’s not a number). Fixed in 1.4.1.

    1. Done thanks to meta keys I added also in 1.4.1 that will help verify there was an old value (transients are erased based on expiration periods).

    2. That’s really good idea, indeed, I don’t know why I never thought of that 🙂 Added in 1.4.1!

    I don’t have any plan to make a Pro version but I’m happy to hear your feedback 🙂

    Thanks. And I sponsored few coffee for you 🙂 hope you received my donation and continue developing such wonderful plugins.

    I request if you can provide an option to show/hide view column in admin area in plugin setting page. It’s really needed for one point control in a multimember site. Once again, thank you very much for such a nice plugin.

    Plugin Author maximevalette


    Thanks 🙂

    Sorry for the delay, I just made an update with a setting to disable Views column!

    Best regards

    Thanks. It’s perfect now!
    But paypal returned my contribution for the plugin 2 wks ago 🙁

    Plugin Author maximevalette


    Indeed. I forgot I had to click to Accept!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Great and simple way to integrate Google Analytics for read counts’ is closed to new replies.