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.
Related
we are developing an app where we are providing google signin and we want to implement the feature that if particular user's google connections also installed the app, we need to display in one section. so we are getting particular user's google id and google token while google signin. Now we want to get list of his connections from his google id or google token
we have seen this link https://developers.google.com/people/v1/read-people but it will be useful when we are making website out of it. We are making an Android app so we require to fetch list of connections from the user's google id or google token
Is it possible? if yes, please help us
Thanks in advance!
I want to implement Google analytic functionality same as wordpress plugin provide https://wordpress.org/plugins/google-analytics-dashboard-for-wp/.
Is it possible to fetch google analytic data for any website by just using google analytics UA-11111-1 ID using core php without any authentication( like without passing client_id, client_secret etc..)?
To access data from the Google Analytics api we use the Core reporting api if you check the page you will notice it says.
All Requests to the Core Reporting API must be authorized, preferably
through OAuth 2.0.
Google Analytics Data is private data owned by the person is admin of the account. The person with admin access can give access to other people by adding there emails to the account.
In order to access Google Analytics data you need to be Authenticated. If you have access then you can use the API to access the data. You cant just take someone's analytics tracking code and grab data for there website. That would be like my being able to grab your Google drive documents or your private Google Photos.
Question: Is it possible Google analytic data for any website by just using Google analytics UA-11111-1 ID using core php without any authentication.
No. you must be authenticated.
But, If you have access to the analytics account in question you can use a service account which will not prompt for a user permission. I am really hoping this is what you meant to ask and not that you are trying to access random peoples Analytics data.
In the case of a wordpress plugin if you are releasing this for others then you should consider a service account. Your users will have to create there own service account in Google developer console, you cant release your client_id in a wordpress project. They can then add the service account to there Google Analytics account and will have access to there data on there wordpress site.
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.
I've played around the the Analytics API and used oauth and managed to pull data from my Analytics account, this wasn't too much of a bother and worked really well.
The problem is I'm building a small "data graphing" service for me clients, this will basically feed data from Google Analytics, Telephone tracking and a few other services into a central area that'll display how many people are contacting them from their website.
The problem is that to use the Google Analytic API you need to be authenticated by oauth, this prompts the user to log into a Google account.
Is there a way in which I can get my GA data without the need to manually authenticate with oauth?
You could try GAPI - Google Analytics API PHP Interface
Here's the Google Code page of this project:
http://code.google.com/p/gapi-google-analytics-php-interface/
Features (as mentioned on the GAPI project page):
Supports CURL and fopen HTTP access methods, with autodetection
PHP arrays for Google Analytics metrics and dimensions
Account data object mapping - get methods for parameters
Report data object mapping - get methods for metrics and parameters
Easy filtering, use a GAPI query language for Google Analytics filters
Full PHP5 Object Oriented code, ready for use in your PHP application
I'm building an application which will basically be an interface for my Google Finance account. Several people will use. I have just started to research on how to do this, and one thing that immidiately seems like a hurdle is Google's oAuth system, seemingly designed for the case where each user logs into his account himself.
The usual proceeding as I understand it is that from my web application, the user gets redirected to Google's page, where they enter their information, and then are sent back. I will wind up with an authorized token that I can use to pull the data that I want.
BUT, now, as my application will ALWAYS and ONLY pull data from my account no matter who is logged in to my application, I need to always be authorized and it needs to happen programmatically without the user ever knowing.
Is this possible?
If this is designed to be an interface to YOUR Google Finance account that several people will use, then OAuth is probably not the answer you're looking for.
OAuth would allow your app to pull information from your users' Google Accounts, whereas ClientLogin would allow your application to pull data from a single account.
Check the Google Finance API for more details and examples:
http://code.google.com/apis/finance/docs/2.0/developers_guide_protocol.html#ClientLogin