Skip to main content

Building a google analytics webpage simple dashboard using GA4

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! I don't think the cPanel Forums are going to be of much help for this type of request. You might have better luck with a development-specific forum, or even something like Stack Overflow.
    0
  • durangod
    Hi, thanks for your reply. Yeah i have been down a huge rabbit hole on this one, seems that whichever way i turn its going to be a paid service one way or the other, if not the paid google service then some other service. I did find a good script but since GA4 is no longer going to support UA views (the sublet of properties) then it wont work either. That does not include adding security using SAML, OpenId, or AWS to secure the JSON file, and that will have to be a paid deal as well. Here is what i found but as i said google has limited the views feature to the paid GA4 only. I did get it to work using an old UA view id, but as of the end of this month that is gone and the work arounds are quite pathetic. as well as as not all of my users will have cPanel i will need to write something for the masses. It is still early in my learning curve so i hope to put together something. I think both of those are part of cPanel or at least available from the host. The trick is to be able to view the stats page as a seperate document in the browser so i can load it as part of the site page. At first glance it looks like analog is dedicated to cPanel login only, but webalizer might be the ticket as it appears there is some kind of process for accessing it programmincally. Do you have any knowledge of analog or webalizer yourself?
    0
  • cPRex Jurassic Moderator
    Both of those tools have a LARGE amount of stats, with Analog being the most verbose.
    0
  • durangod
    Both of those tools have a LARGE amount of stats, with Analog being the most verbose.

    The problem with webalizer is that first my host wont enable it on my shared server and on the website i cant seem to figure out how to even download it, something to do with anonymous ftp but i have no clue about that and it does not give a password either. Plus it has to be compiled which i cant do on a shared server. Analog i can download but im sure cPanel has a much modded version of analog because the analog website is old and dusty from 2004 and seems the script got abandoned after that. So its very old and out of date which is why i think that version and the cPanel version are way different. So where i am on this is that i am at the point that i will most likley have to take three scripts, analog, and two scripts from github and pick pieces of them that gets the data i need and just recode it my way building the puzzle pieces until i get what i want. The visual i can handle no problem i just need to find the raw data somehow. This is the data i believe i need to start with. The server data i can get using PHP and/or shell_exec as long as shell_exec it is enabled on the server. But for site stats i will need: Visits and all data associated with the visit (client, version, referred by, page departed on, duration, bounce rate, country, ip) Then i will also need separate data for page views, bounce rate, unique visitors, pages per visit, latest visits, search terms, and search engine) and average from aggregate numbers for some of those same stats. So that is where i am at now... suggestions are appreciated :)
    0
  • durangod
    Hi, anyone know if analog data can be accessed programmically? Even if i can get it via command line would be ok i can just use shell_exec.
    0
  • vanessa
    Stats are in /home/$user/tmp, feel free to look at those files and see
    0
  • durangod
    Stats are in /home/$user/tmp, feel free to look at those files and see

    Great found them, thanks so much. Also a quick update here regarding the google analytics info and the non support of ViewId going foward. I was thinking there is no way that google is going to turn their back on millions of small businesses and thousands of third party vendors that need the analytics data, IMO google is not going to ask all those people to put up $150,000 for analytics 360 just to get stats. So i did some more digging and i found it... All google did was change the API that you use, now just use the google analyitcs data API (not the analytics reporting API). Plus the google analytics data API uses the property ID which is awesome.. So whalllllaaaa! looks like i have the google part of getting the data complete... Now i just need to work on the option for those that dont have cPanel.
    0

Please sign in to leave a comment.