I am using Google Analytics Embed API in one of my projects and I haven't figured out if it is possible to change language of the rendered charts. Default one is english. Autentication is done on a backend side and I use google service account for gathering the data (the exact same scenario as shown here)
I assume it should be possible since Google Analytics are available in different languages, but I was not able to find the solution anywhere.
The Google Analytics reporting API returns data in English only there is no way to change the language it is returned in.
The Embeded API access the Google Analytics reporting API. If you want to change the language you will have to pre-process all of the data returned from the API yourself and change the language and then display it in the Embeded graphics API .
Related
I am in a need of sharing a Google analytics access of my website to a developer and want to hide revenue and conversions sections in Google Analytics account/property/view.
any guidance how is it possible to do that?
if you want to share access to the report in Google analytics web application then the simple answer is you can't, access to a Google analytics account is all or nothing
you could grab the data for them through the API using a service account and design your own reports display of the data
It is not possible to give visibility to only some sections or metrics of a view. You can use API (like said to DalmTo) or more simple to provide data with an external dashboard, for example with Google Data Studio, which fetches data from your Google Analytics and shows only the ones you want to share.
I want to build own analytic platform base on google analytic (GA).
So I had a quick investigation on GA.
But I have some misunderstand below:
In the website and web apps field, google analytic give three options: gtag.js, analytic.js, AMP HTML. But I don't know what will I choose whichever. or could you help me point out the case that we will use for each option?
I tried to follow gtag.js, debug and realize that google analytic send a gif request to post data to google analytic server. I think they use this way to avoid cross-domain Ajax. But the question is how they send data to google server by Android/IOS sdk? They still used gif request or normal restful api.
If anyone know or have idea please help and sharing to me.
Thanks in advance
Jame
gtag.js (global tag) is the current version of Google tracking code - "global" because it aims to provide a unified tracking code for Analytics, Adwords, and other Google products.
With the release of the gtag libary analytics.js is now the legacy version of the Google Analytics Javascript tracker, so currently most available information refers to that. However if you are getting started with Analytics you probably should use the current version.
AMP are accelerated mobile pages, a special format with reduced markup and scripting options that is cached on and delivered from Google servers (you relinquish control over your pages in favour of faster delivery, basically). If you have to ask what this is then you are not using it, and do not need this type of tracking code.
If you use Google Analytics in a mobile website you'd use the Javascript tracker and that will indeed return a gif.
If you want to track a native App you would, these days, use Google Analytics for Firebase which comes with it's own SDK. You would implement Firebase in your App and then connect the Firebase project to a mobile property in GA.
In the Google Analytics console I can easily create charts and add them to dashboards. But how can I display those charts or dashboards on a 3rd party website?
I've seen the Embed API, but it looks like the definition of the reports is always in the Javascript. Is it not possible to say something like display the dashboard that I already created which name/id is XYZ?
Or is there a way, when creating a report in Google Analytics, to get its definition so that I can easily use it? I saw Query Explorer but it doesn't help.
No you can not take the Google Analytics dashboard and display it on another website.
The best option there is to date is the Embedded API which you mentioned. Although it has its limitations. The Embedded API is designed to display a specific users Google Analytics Dashboard who ever is logged in. If you are trying to share the information from your account with other users it wont work unless they also have access to your Google Analytics account.
The Query Explorer shows you what the google Analytics API is capable of. You can develop your own tool to show this information to your users.
I have a small multitenant application and I want to use google analytics to track the different minitenants. Tutorials on this topic seem to be pretty scarce, but I was wondering how I would go about
1) Rendering the dashboard for each 'site'
2) Allowing the creation of new sites for google analytic 'sites' automatically.
Using a 'global' Google account.
Any help would be very much appreciated.
For building dashboards to report on the analytics of your various sites/properties I would recommend using the Embed API to get started quickly. But since you stated you are interested in also managing Google Analytics properties programmatically. It might be useful go through the quick start guide for the language and application type of your choice. Python Service account or a PHP Web App, the list goes on.
But if you need to actually provision new accounts for each end user there is also the Google Analytics Provisioning API. There are restrictions on who is allowed to use that API, namely you need to be AdWords Channel Partner.
Is there a way to embed charts from Google Analytic onto a webpage and allowing the public to view the charts without having to authenticate themselves?
I keep getting pointed to OAuth2, but I dont want my users to do any kind of logging in.
Some help please.
Something similar to the question below, but he doesnt seemt to have found an answer.
Google Analytics API in Javascript
Yes this is all doable. If you just want to show them your data not there own data then you can use a service account. If you want to show them data from there own accounts then you have to go though Oauth2 and authenticate access to there account.
Your Data
You can't use a service account with JavaScript so you will have to do it yourself in the background in your C# code.
I recommend you use the Google.apis.Analytics.v3 from nugget. You can find a tutorial series on it here Google Analytics API authentication with C# as for displaying the charts check out Google Charts
Their data
If you want to display there data and need to go though Oauth2 then the Embeded API will do all this for you.