A client asked me to display the number of hits/visitors in their website. I would like to know how can you do display this.
I would insert it in my footer as displayed:
If not possible with google analytics, do you know of a snippet which will work? I've checked websites which offer their services but they recollect information and I would like to learn to do it myself or with google analytics. My files are PHP so maybe there is something I can do with that?
You can use google anlaytics api , which can be enabled in your google api console. For knowing the number of visitors in given time period, you can utilize Core Reporting API and for knowing the current number of visitors in real time , you can use Realtime Reporting API