How to share a part of the site in Google Analytics - google-analytics

we have events listing website and events from different organizers are grouped (by URL), like -
www.site.com/organizer/event1
www.site.com/organizer/event2
www.site.com/organizer/event3
etc. How to give an organizer an access only to his/her part of the site's Google Analytics?
Easy way -
An organizer registers in Google Analytics
An organizer creates a counter in Google Analytics
An organizer sets this counter in his/her profile on our website.
We add this counter to our Google Analytics code on www.site.com/organizer/* pages
He/she clicks on some link in the profile and sees the GA stat only for own events.
The way I want it:
He/she clicks on some link in the profile and sees the GA stat only for own events.
Is this possible with some API to separate statistics for www.site.com/organizer/* and share a private link to it with organizer?

After reading your comments in another answer (which is basically just a copy of the comment I left on your question). I have changed my recommendation left in comment, think you should use the Google Analytics API for this.
Since you want to give others access to your own data I suggest you use a service account. You will need to do this in a server sided programing language, say PHP or C#.
Every night run a job that will extract the data you want though the Core reporting API. Store it in the database then create a page that will then display only the data you want to the different people. You will only need to run your job once per day as the data for previous days will never change. Wait at least 24 hours to get the data as data hasn't completed processing for 24 hours.
I am not sure what language plan on using but these tutorials should get you started: Google Service Account with PHP or Google Analytics API Authentication with C#

I would create different profile views with filters to include only the subset of data for the subpages.
This way, you can add a specific user access rights to that specific profile only, so they can only view that profile when they log in.
Create an include only filter which filters on Request URI: /organizer/event1, /organizer/event2, /organizer/event3 etc.

Related

Gathering data from google analitycs to my own admin panel

I'm starting with google analitycs.
Before I'll start implementing this into my pages I'm wondering if I'm able to get informations like average time at site, where my user came from, which devices they are using etc.
I would like to get those information from my VueJS front SPA application by async HTTP GET call and display those there. Is it possible?
If yes I would be very thankful if you provide some links to google API where I can find it or some tutorial.
Since Universal GA you can't access users' origin data outside GA in your application. Before that you had all this juicy information inside a cookie, inside __utma, __utmz etc (more info here).
The information you're asking about (time on site, pages visited, etc) can be retrieved from GA afterwards if you make use of the userid feature.

Hierarchy of Google Analytics for Multiple Builds of Same App

I am setting up Google Analytics Accounts for a Product which have multiple builds as frontend for same user base.
So we have one Product called X and have:
Web Build
Mobile Web
Android App 1
iOS App 1
Android App 2
iOS App 2 6.
The main point is identical APIs and User base is used in all platforms and apps. So if we have a user John Doe he can login in any of the web or apps.
We want to extract following information from Google Analytics.
Under User ID feature want, sessions aggregations of that user around all build and apps, but identifiable. So I can know that user John login to web yesterday and used mobile app today.
Each user belong to a customer (company) in our system. So want to segregate all information based on companies.
I already have achieved point 2 by creating a custom dimension in Google Analytics and believe that's the best way to do it.
Now need suggestions from Gurus on how to acheive point 1 using Google Analytics.
Either use single account and single property for all builds and apps
If yes, then how to identify those apps and builds in sessions
If I use multiple properties/apps in GA account then how to aggregate user sessions among all?
Looking forward to hear how guys around hand or should have handled this scenario. Cheers!
This question is extremely broad, IMO any answer your going to get is going to be primarily opinion based. So here is my opinion and a little extra info to boot.
The first issue you are going to have is that there is a difference between Mobile google analytics accounts and web analytics accounts. The two do not mix. Mobile analytics accounts insert screen views with a screen name. While web accounts insert PageViews with a document location.
There is no way to analyze between two different Google analytics web properties. Unless you intend your android and ios apps to run as websites and send it like its a webpage its not going to work. You could potentially download the data into your own system or big query and analyze it there. Comparing your custom dimension to see what the users have done differently. I would wonder at the quality of the analysis you will get as there will be no real way for you to compare the data and match it up beyond using your custom dimensions user id and possibly date.
I am adding this because I am not sure what your saving in your custom dimension.
The second issue you are going to have is tracking. Google analytics TOS does not allow you to send any identifiable information to Google.
The Analytics terms of service, which all Analytics customers must adhere to, prohibits sending personally identifiable information (PII) to Analytics (such as names, social security numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a mobile phone’s unique device identifier if such an identifier cannot be reset).
You could for example send your companies customer id for John as a user_id but user_id is an internal valuable used for internal processing this is not something you can extract out via the api.
The User ID enables the association of one or more sessions (and any
activity within those sessions) with a unique and persistent ID that
you send to Analytics.
To implement the User ID, you must be able to generate your own unique
IDs, consistently assign IDs to users, and include these IDs wherever
you send data to Analytics.
For example, you could send the unique IDs generated by your own
authentication system to Analytics as values for the User ID. Any
engagement, like link clicks and page or screen navigation, that
happen while a unique ID is assigned can be sent and connected in
Analytics via the User ID.
The best you could do would be to create a custom dimension and send that with every hit username=johnscustomerId. Which you appear to have already done. This is what I have done in the past and it works perfectly well.

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.

Separate analytics for each profile page within a single website

There are multiple profiles on my website and each user is managing his/her profile himself. I am trying to find the most efficient way to present analytics of each profile to its owner. Here are 3 ways I found:
Record each and every hit made on a profile page against that profile. This is not just count of hits, this requires to record IP, country, referrer, search terms etc. against each hit. This would require me to manage a huge database as there would be a lot of hits on each page. And a lots of processing on this database. Even if I have to de this, what database is recommended for such use?
Use Google Analytics on each page. But I am not sure that Google Analytics provide an API to fetch Analytics for individual pages.
Use some open source solution like piwik. Again I'm not sure if they provide per page analytics or not.
Please suggest the pros and cons of using each approach.
Update: More explanation - Think of it like a facebook page where each user can see hits on his page. What solution you'd suggest?
For Piwik, you can create a site id for each user, because you are allowed unlimited site ids with Piwik. You can can use a tracker with that user siteid, so when your member logs in, they get data only on their pages. You might also want to look at using custom variables and use the Piwik API to filter data.
Check here for info on multi-tracker: http://piwik.org/docs/javascript-tracking/#toc-multiple-piwik-trackers

ability to capture on what user was doing on the web page

Is there a tool to capture actual user experience on a my website. I would like to capture things like customerid, which button they clicked, information in their cookie, query string etc. etc. etc. Is there a tool that I can plug into my website that would provide this information for a web page and dump into nice columns in sql server table? I would like to be able to …
go through the logs.
Pick a particular log entry
Zoom into that log entry and look into more detailed information like querystring, cookie data etc.
Be able to capture all the information on what user was doing on that page when the exception happened.
Is it possible? Is there a tool out there for this?
Thanks.
This article describes using Google In-Page Analytics to generate heat maps for where users click on your web pages but this is aggregated rather than for specific users. In addition to the normal hits GA records for a page you can also add custom hits based on client-side interactions using a technique similar to tracking outbound links. We used this with the GA Funnel to track progress through a sign-up form.
Having ELMAH installed is unbelievably useful for a wide range of reasons and will be well worth configuring if you haven't already.
I found WebLog Expert to be very handy for analysing the IIS logs at an aggregate level.
I'm not aware of any one product that does all three elements and none specifically well at the per user level.

Resources