System design - Google Analytics - google-analytics

I'm working on the architecture for a project that includes a Android and iOS apps and a web interface with a subset of the mobile apps functionalities. The project is basically a e-commerce solution. In all three interfaces I'm using Google Analytics to track some information. However I'm having an internal discussion about the extent of the information I should send to GA. What should I store in GA and what should I store in my own server?
Let me give you some examples.
Session tracking is clearly something that belong to GA.
ProductDetailViews. Sounds like something that should go into GA, specially considering the enhanced e-commerce module.
Shared item. When a user shares some content over a social network, should I store that information on GA or in my own server? I'm inclined to GA but it becomes more ambiguos.
Do you see my point? Can someone share a general rule or recommendation on what should be saved in GA and what should be saved on the projects own server?
Thanks

For those examples I would generally send all the hits to Google Analytics. Here are a few reasons:
Preventing data silos. You want all of your data in one place and Google provides you with a database reachable via the API where you can keep all your data organised in one place. This is important when you are considering measuring performance, as you want to avoid duplication of conversions or traffic hits
Useage of Google Analytics advanced segments. With all your data in GA, you will be able to create advanced segments for analysis. But the real power is if you are using AdWords or retargeting, as you can send those Advanced Segments to AdWords, and target those users around the web with your custom data
Single point of reference for users All analytics are inaccurate, but you want to make sure they are inaccurate to the same degree. Using GA keeps all your data on the same playing field
Usability and Freedom of information Its easier to serve up your data to users within the GA interface as people are more likely to know how to navigate that than your database. You can also use the GA API to pull out any data you need to push into other visualisation tools.
User session merging With your data and userID tracking in GA, you may be able to track users as they arrive via mobile to desktop and back again, over multiple sessions.
What you need to avoid putting in to Google Analytics is personal info such as names, email address etc. There are against the TOS. But you can capture a unique userID, and match that outside of the tool later.

Related

What is the best practice for setting up new Web+App Google Analytics?

I have two properties I would like to track via Google Analytics:
1. A cross-platform web-app - I currently have this connected to Google Analytics new App+Web implementation.
2. A marketing website that drives leads to the web-app - I currently have this connected to a separate property with the traditional Google Analytics implementation.
My question is, is it best practice to connect my marketing website to the same App+Web property as my web-app via a new data stream? or should I keep them separate?
It is my understanding that the App+Web is meant to connect all your platforms in one property, I'm just not clear if this should include a marketing website or not.
I would like to be able to track events between the marketing site and the web app, which is why I'm considering have them both under one property.
Thanks!
-Zach
I think you can do this as it will be more convenient for you, you can track it in two different streams. I think it will be more purely about data.
In Google Data Studio reports, you can always combine all the data and conversions that you set up into a single live report. I think this help might help.
I always use different Google Analytics streams for apps and different sites, so it's easier for me to track, and in Google Data Studio I collect all the data from Analytics, call tracking, and user session recording tools in one unit for comprehensive data analysis

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.

Can I Get Individual Session Data from Google Universal Analytics?

I'm trying to add recommender systems to an existing website. In particular, I'd like to implement item-item collaborative filtering, to figure out what pages users tend to visit in the same session--much like Amazon's "People who viewed this item also viewed...."
At a minimum, collaborative filtering requires data on each individual viewing session, so that the algorithm can determine which pages get viewed together, rather than just tallying up how many times each page gets viewed in the aggregate.
If I were creating a new website, I could pretty easily add code to collect this data. However, this is an existing website, and has been set up to use Google Universal Analytics.
I have two questions:
Can I get Universal Analytics Data through an API? I need to be able to analyze the data using my own algorithms, not just look at it in a dashboard. I know about the Core Reporting API--but the Core Reporting API doesn't seem to include any extra Universal Analytics variables. I know about the API for sending Universal Analytics data, but that's not what I'm trying to do here.
Assuming I can query an API or otherwise export the Universal Analytics data, will I be able to distinguish individual sessions? The idea here is not to ask questions about individual users (let alone associate their data with some other data), but simply to figure out which pages were viewed in the same sessions.
Thanks for your help.
You can use the Google Analytics Core Reporting API many combinations of the available Dimensions and Metrics. You should check out the Common Queries page to get a sense of how precise you can get in terms of how people might use your application.
Also the Hello Analytics APIs Quickstart guide is a good place to start if you haven't developed an application with Google APIs.

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

Google analytics api

I would like to have a div on my companies website that is filled with links to our most-visited pages dynamically by querying our google analytics account. From everything I've been looking at in the DataExport API though, it seems like the user viewing the site has to authenticate. Am I missing something?
This is correct: google analytics only supplies exported data to an authenticated user (you wouldn't want it otherwise after all, with your competitors peeking at your data, right?-).
You can run the application querying analytics separately, with all required authentication, and have that application supply such data selectively to "your company's website" with whatever level of validation you think is warranted (to avoid snooping competitors) -- if the exact subset of data that you supply (just most-visited pages, for example) is not sensitive according to your judgment, you may in fact get away without the "validation" part!-).
You could add a server side script that grabs your analytics data using the api and write some javascript that inserts it into the div.
There are a number of different client libraries for google analytics you could use.

Resources