Can I share my google analytics result to someone else? - google-analytics

I work in a small company and we - as many others = use google analytics to monitor how well/bad our site is doing.
To access this information we put the google account's details (username and pwd) and off we go.
I now want to share this information with one of my clients but I don't want to give him my google account.
can anybody suggest the best way or the best practices to achieve this ?
Many Thanks
Lp

Given that you want to "publish it", you might want to extract the relevant data via the Google Analytics API, which provides read-only access, works just like an ordinary Google Data API--this way you can serve it from your own Site without restriction.
That still leaves the presentation of that data, but at least you have complete control over it.

the client can give you HIS account and you give his account view rights
You create anothe rgoogle account just for read only access, give it read access to your google analytics and send the password that client.
I dont really see the issue here ;)

Check out EmbeddedAnalytics. This is a service tailored specifically to allow you to define nice looking charts against your Google Analytics data and then embed them on to your site. The service utilizes the Google Analytics API.
(disclosure: I work with EmbeddedAnalytics).

You may now use Google Analytics Embed API for the purpose. Clients still do need to have Google account.

Related

How can I use the Google Analytics API to pull GA Account Change History?

I want to be able to pull the Change History report from Google Analytics... any ideas/help would be much appreciated!
*It looks like the AdWords API offers this function, but I need it for the Analytics API
You can't. The relevant API for this would be the management API, but that does not list a function to get the account history, so you do not have programmatic access to that.
You could probably write a script using a bowser automation framework like Selenium that logs into Google Analytics using your own credentials, navigates to the account history, downloads the HTML content of the account summary page and then parses it to extract the desired information, but that would not involve the Analytics API at all (and is nothing that can adequately described in a Stackoverflow answer).

Is it possible to integrate google analytics dashboard to our own website?

I want to show google analytics dashboard to my users. It is not possible to give access of "google analytics dashboard" to all users. So I want to integrate it on my own website. Will it be possible to integrate google analytics dashboard on a particular website?
This question gets asked quite a bit. It is important to understand the security model for the API. All Google APIs use OAuth2.0 to authenticate the user. This is designed to make it easy to use the API to access the Users's data on behalf of the user. In contrast you will need to do work to show Your data to your users.
With that said, an example of what you are looking for is the Server side Auth example provided by the Analytics API team.
The simplest answer is to query the API on the server side, with a service account and serve that data as you serve any other data to your users. Read the scenarios in detail, and pick one that best suits your end goals. Understand how the API views the following entities.
A User uses an application.
A Developer develops Application.
An Application has a project id and its associated credentials.
A user authorizes an application to access their data via the API.
You are breaking this paradigm because you are the user and developer from the API's perspective. You want to share your data with people who are not authorized to view it, so you will need to use a service account to access that data and share it directly with your users.
Also remember to add the service account to Analytics View you wish it to access.
Check out EmbeddedAnalytics if you prefer not to get bogged down learning oAuth2, the CoreReporting API, and lastly a charting tool. We simplify the process. All you do is create your chart and embed a snippet of code in your site where you want the chart/dashboard to show.

Allowing user access to analytics

I would like to enable (some) of my users to view my website's analytics data.
Our website has a bunch of groups where users can add content. I would like to enable certain users (group admins), to view usage statistics for that specific group. Ofcourse the data should only be accessable to those users with the VIEW_ANALYTICS right, not to any others.
Is there any way to do this in Google Analytics, or is there some other platform I could use to easily achieve this goal (we use AWS for our hosting)?
Regards,
klmdb
The Google Embed API allows you to display analytics data in your own pages. Pages that are only accessible to the members of your VIEW_ANALYTICS group.
You can create a service account and give it the appropriate access in the analytics user management for the property.
You also authorize the service account to use the embed API in the developers API console. (I don't have enough points to include more than two links in an answer.) In the API console you can generate a private key (p12 or json format) which you then use on your server to authenticate the request for analytics data.
You don't say which technologies you are using, but they show Java and Python examples of how to set up the authentication by the Service Account. I've also seen some node.js and php libraries.
This way you don't have to manage who has access through the google anayltics admin system, you just need to control who has access to your "dashboard" page.
I have done this all with client-side javascript and it works. Of course the client-side nature means that anybody who knows how to use browser debug tools can get our private-key, but in our particular case I'm not worried about it. On the other had it seem like you need to keep some security around this so I wouldn't recommend the client-side solution.

Google analytics Embeded api with out Oauth authorize

How can i use gapi.analytics.auth.authorize without button..
I need it for customers, to track visits on their subdomain, and I have my analytics code on page, so they can't use button to authorize, need without it, automatically.
Any example?
Your question isn't very clear it is hard to understand what you mean by Button.
I think you mean that you would like to select data from YOUR Google Analytics account and display it on YOUR website.
To do this you will need to use a service account as apposed to Oauth2 (Oauth2 would popup with a new window requesting access). When you create the service account in the Google developer console take the service account email address. Give it access at the ACCOUNT level in the Google analytics admin section. It must be the account level this will then give the service account access to read your Google analytics data.
Quota: I am not sure what you are extending to do here but remember you can only make 10000 requests per day against your Google Analytics profile. After that you are cut off there is no way to extend this number. So I advice you to save the data in the database someplace you shouldn't request the same data more then once.
Example:
I suggest that you look for an example in what ever programing language you are intending to use. Again your question doesn't state anything about what language you will be using. Hello analytics API might be a good place to start but it depends upon the language the PHP one is way out of date I wouldn't bother with it. Also you cant use a service account with JavaScript so that one is out to.
Update figured out button
Embded api I think I have finally figured out what you mean by button. gapi.analytics.auth.authorize is used in the Google analytics embedded api. Which is JavaScript which it is not possible to use with a Service account. So the final answer to your question is
Answer: You cant remove the button from the Google Analytics Embded api the only way to login with JavaScript is to use Oauth2.
Advice: switch to PHP and use a service account to request data yourself. Or give each of your customers access to your Google analytics so they can login themselves.

Can I present google analytics data to users within my application?

I'm creating an auction site and would like to provide my sellers with analytics related to their product pages - visitors, search terms, etc. I could roll my own analytics but want to know if it is possible (or forbidden) to use google analytics within my application and present that data to my users. Is this possible, has anyone done this and, if so, how did you go about it. Thanks in advance
Sure, you can do this.
The easiest method is to give your sellers direct access to GA. I have no idea how you have your GA interface setup but you can setup profiles in lots of different ways (filters, segments, etc..) to have the profile show data only for the specific seller, and give their GA account access only to their profile.
Alternatively, GA provides an API for retrieving data from them and displaying on your own site.
Also you can provides Real time data reporting via Google's Real Time API - https://developers.google.com/analytics/devguides/reporting/realtime/v3/devguide
Which will provide several data in the manner of dimensions and metrics

Resources