I am building a service like Wix.com, users can build simple mutli-pages website with ease. Every website will be including in a global Google Analytics account with a unique profile, then the tracking code is to be placed in the website pages.
Now, on the website dashboard i want to show the online visitors and the total number of visists for the website for each website separatly, trying to do so i have :
Tried using GAPI (http://code.google.com/p/gapi-google-analytics-php-interface/) but due to Google Analytics major update it doesn't work anymore.
I found Google Core reporting API for Analytics, but i believe it's made for 3rd party applications that accesses GA data for their clients, meaning that the user should have a Google account and GA profile for the website, and the App just connects to the account and retrieves data. And this of course isn't the case here; i can't ask the user to create a Google account and embed the tracking code in the website HTML; else what am i here for ?
Got the picture ? I need the simplest method to do this, no fancy stuff.
PS: Minutes ago i found this: Google Analytics Query Explorer (http://ga-dev-tools.appspot.com/explorer/), it's a 3rd party app that builds custom queries for GA and gives you the link, something like that :
https://www.googleapis.com/analytics/v3/data/ga?ids= (the ID) &dimensions=ga%3AvisitCount&metrics=ga%3Avisitors&segment=gaid%3A%3A-1&start-date=2013-02-01&end-date=2013-02-23&max-results=50
Now, trying to access the URL (thinking; this is easy :) ) the respond is a request for login first :
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}}
Thanks in advance.
Unless you have fewer than 50 clients this plan is not going to work the way you're asking for. (There is a limit of 50 profiles per account.)
The client will have to make their own GA number and provide it to you as a setting for their website.
In order to display the customers reports on a dashboard on your site you're also going to have to get them to authorize a GA App you create for access.
Related
I have been exploring some with the Google Analytics Core API. I reached the point where I wish to collect queries from external/other sources. Yes, I do know for some people this may sound a bit stupid, since this is very sensitive data for some companies or whatever. Anyhow, is this possible? Is it some kind of identification that can be found in the dashboard of Google API:s? That lets others to get access of the same data, but from other API requests?
I have tried other webpages view ID:s but without success.
I can not find any documentation about this matter either.
This is possible on the Adobe Analytics API. So I see no reason why it shouldnt be able to do on Google Analytics?
Edited, scenario added.
Im trying to figure out how many sessions a website for which I do not
own has.
I want access of the data in google analytics that my company has. I'm wondering if this is possible to get their data from my API requests based on their identifications,etc. I want to create my own dashboard with many different Google analytics sources. Or, do I need to use the same client_secrets that is connected in the Google API dashboard of the owners?
Kind regards, Peter
You should understand the difference between private and public data. Private data is owned by a user public data is owned by no one. Searching for public videows on YouTube would be a good example of public data.
Google Analytics data is private it is owned by the person or people who have access to that Google analytics account. You can not access the data associated with my website unless I grant you access to it. If you are working on an application and need to access someone else's Google analytics data then you can use Oauth2 (using client id and secret) and have them authenticate the application and you will be able to access their data.
You can not access Google Analytics data that you do not have permission to access. We get permission by using Oauth2 or a service account.
If you have been added to your companies google analytics account and you have access to it then you can use the Google Analytics API to access the data for those accounts. By going though the management api you will be able to see all of the accounts that you have access to and use that to make your dashboard.
Just remember though the Google Analytics api returns raw data not graphs you will have to create your dashboard yourself. or try checking out the embedded api but that will only work with one view at a time i as far as i know.
I am working on a website for my organization which will allow users of the website to create/modify/etc room reservations for a number of spaces in our building.
Each room has a Google Calendar which links to several monitors around the building to display what rooms are [un]available. So, my goal was to utilize these calendars by having the website I am creating edit these google calendars. The problem I am having however is that from all the documentation I have been able to find, it looks like you have to prompt each user for Google Log-In. This is what I am trying to avoid. I want individuals to be able to log-in to my website, and then on the backend my website provides the authentication to Google so that they can add/edit/remove events from the aforementioned GCals based on permissions on set on their account.
Can anyone help direct me to the proper documentation? I've found a couple of things through some intensive Google-ing of my own, but I've become extremely confused about what method I should be using.
Any assistance in getting things rolling is appreciated!
If I understand it correctly, the concept that you want is to create a website that writes into your own calendar and not on the users calendar. Exactly what this 3 part tutorial of Sample Web Page for Booking gives:
Part 1: Setting up Google Calendar
Part 2: OAuth2 and Configuring Your ‘Application’ With Google
Part 3: A Sample Web Page For Bookings
This tutorial worked for many like what has been done in this SO post - How do I connect to the Google Calendar API without the oAuth authentication?.
I'm looking for a way to retrieve and then display (with some Highcharts - like library) the current traffic we have on the website. The same way google analytics displays it on the gioogle analytics admin dashboard, but I'd like to retrieve with some API and display it directly on our custom dashboard.
After reading through the complete google analytics documentation, I've understood that
"Google Analytics API doesn’t support real-time stats yet… but this is
still useful if you want to display pageviews or number of visits on
your site and have it automatically update."
So my question is, is there another API to retrieve and display the current/instant traffic on a website on our custom admin dashboard. Or, is there a workaround (with AJAX ?) to do so with the google analytics API ? ( i've seen that you can retrieve the amount visitors on a given perido, so even if this is not real time, fo now it gets as close as I can to my goal)
I'm working with php and javscript
Thanks
No - the current API doesn't currently support true real-time statistics. It is the most highly requested feature though:
Google Analytics developer issues and feature requests
Access to Real Time Data
We develop services which integrate with the API. On average I estimate the latency is about 1-3 hours. I believe the larger your dataset it the longer the latency.
I am developing an advertisement site in PHP, the user can only list there products by logging in using there account in the site. Also i need to have another option for users to login into the website using there Facebook account and hence advertise about their products. How can i implement? Do i need to create any application instance in FB for this? I am looking forward for valuable suggestions.
Create an app.
Look into authentication, and see which method (server-side vs. client-side) fits you.
Once you've implemented that, you can make graph api calls. https://graph.facebook.com/me gives you the user's basic details
Good luck.
I recently use the great php class call : Google Analytics PHP API. I manage to get it working to get a lot of info and stats for my 25+ website that have analytic
Now i like to get more data like
The page rank the google placement
(where i am on google #325 or #520)
Google Page Rank
Google Indexed Pages
Traffic Rank
Inbound Links
DMOZ Directory
Yahoo! Directory
get a summary (my way) much more like http://websitegrader.com
do you know a php class to do that ?
I guarantee you're not going to find one "class" that does all that for you.
Manually checking your site's rank on Alexa is probably going to be your best source of information on top of what Google Analytics is already giving you.
Google Analytics does NOT require any sort of API.
The site you linked to asks for your Google username/password. I'm flagging this question. I encourage others to do the same.
you can get all from alexa api (Alexa Web Services)
http://aws.amazon.com/awis/
but not free
$0.00015 per request ($0.15 for 1,000 requests)
i thought in the past to build a website to arrange an Arab sites
but arrived at the checkpoint
somme website use awis
www.statbrain.com
www.websiteoutlook.com
www.websitevaluecalculator.com