Firebase - where to see a nice graph (pie) for user property? - firebase

My app is using 4 different fonts (condensed, normal, bold and thin) and I want to know how many users are using which one. This is my code:
FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(activity);
analytics.setUserProperty(PROPERTY_FONT_TYPE, "" + getFontType());
I also added this PROPERTY_FONT_TYPE in my firebase console in the part Analytics -> Custom definitions.
How (and where) can I see a graph/pie how many users are using which font?
Firebase console seems to be extremely un-intuitive.
Thanks

This can be done - but in the Google Analytics console not the Firebase Console. Every Firebase Analytics project (now) has a corresponding Google Analytics 4 property, where a "free-form" exploration can be used to view a pie chart.
Step 1
Press the 'View more in Google Analytics button' in the analytics dashboard of the Firebase console.
Step 2
Navigate to the "explore" page in Google Analytics.
Step 3
Create a new 'free-form' exploration.
Step 4
Change the visualisation to a 'doughnut chart'.
Step 5
Remove the default dimension and then add the new dimension that you are interested in (in this case "PROPERTY_FONT_TYPE"). Drag this to under 'breakdowns' (where the default 'Town/city' dimension was).
Step 6
You can now view a pie chart of your custom user property.
The 'exploration' is automatically saved so you can come back to it later.

Related

Firebase Analytics Funnel why no option to filter by event parameters?

There is absolutely no option to do so in Firebase Console or am I just not seeing it?
What is the point of having all these parameters if I can't use them?
screen_view
(app)
when a screen transition occurs and any of the following criteria are met:
No screen was previously set
The new screen name differs from the previous screen name
The new screen-class name differs from the previous screen-class name
The new screen id differs from the previous screen id
firebase_screen, firebase_screen_class, firebase_screen_id, firebase_previous_screen, firebase_previous_class, firebase_previous_id, engagement_time_msec
https://support.google.com/firebase/answer/9234069?hl=en
You have to activate the parameters in the Analytics platform to be able to use them, otherwise you will only be able to see them on BigQuery if you have connected these two platforms.
Link Google Analytics 4 properties to Firebase: https://support.google.com/analytics/answer/9289234?hl=en
How do events and parameters work with Google Analytics 4 properties: https://developers.google.com/analytics/devguides/collection/ga4/tag-guide
GA4 BigQuery Export: https://support.google.com/analytics/answer/9358801?hl=en

Firebase Analytics: How to get and integrate UA-type measurement ID instead of G-type measurement ID for Firebase Analytics?

I am running a React web app on Firebase. Firebase automatically generates G-type measurement ID (G-XXXX). I'd like to get a UA-type measurement ID (UA-XXXX) and somehow integrate it into Firebase project.
Reason: I want to use React-GA package (https://github.com/react-ga/react-ga) but the package apparently does not support G type measurement IDs.
Is there any way to create and integrate the UA-type measurement ID somehow to Firebase project configuration? I'd love to see the data reflected into the Firebase console dashboard, not having to leave the console to see the data.
Any idea on how to do this? Thanks!
I had done it before with the same package.
First; you need to add a "universal analytics property" manually on google analytics page. Because Firebase is only using latest version. Click admin icon at the bottom-left and then click + Create Property
You will see Show Advanced Options button. Enable this of an earlier version of Google Analytics. Once you finish you get your UA-xxxx code.
import ReactGA from 'react-ga';
class GAService {
init() {
ReactGA.initialize('UA-XXXXXXX-X');
//ReactGA.pageview(window.location.pathname + window.location.search);
}
}
const instance = new GAService();
export default instance;

Why can't I create a Google Analytics property view?

I'm trying to use Google Analytics as a data stream for Google Data Studio but it requires me to have a property view. There is no option for me to create a view in my property in the administration page:
There is no column named Views:
Is there something I need to do to be able to create new views?
OBS.: My Google Analytics account was imported directly from Firebase.
Google Analytics is changing and it is a bit confusing. I will try to clarify it for you. As far as I have gone, evolution has been:
1.- "App + web property" (Beta phase)
2.- "Universal Analytics" (*) (until 14-Oct-2020): It is identified because the account number is preceded by "UA-" eg. UA-123456789 (Attention, sometimes it is not very obvious and you have to create a new user to see the UA prefix). This option is only suitable for the monitoring and analysis of Web pages and has the option of analysis using "Views" enabled. If you don't have it, you should:
2.a.- Create a new "Property"
2.b.- "Show advanced options"
2.c.- Activate "Create an Analytics Property"
2.d.- Create only one "Universal Analytics" Property
3.- "Google Analytics 4": It is identified because the account number is preceded by "GA4-" eg. GA4-123456789. In this case, the analysis is not done through "View" but through "Data Stream" (** incorporating a series of improvements) although Google offers the possibility of creating two "Properties" one in UA format with Views and another in GA4 format with Data Stream
In all cases, you must place the corresponding gtag provided by Google Analytics within the tag of the page you want to analyze.
Sources
(*) https://support.google.com/analytics/answer/10089681?hl=es&utm_id=ad
(**) https://support.google.com/analytics/answer/9216061?hl=es&utm_id=ad
https://support.google.com/analytics/answer/9367631
https://support.google.com/analytics/answer/9539598?hl=en#:~:text=If%20you%20set%20up%20a,with%20%22UA%2D%22).
This is a good answer to that question. I had the same problem. In case the URL doesn't load, essentially,...
"If you set up a Google Analytics 4 property with a Web data stream, you have a Measurement ID (which begins with "G-").
If you set up a Universal Analytics ("Web") property (Universal Analytics properties have views instead of data streams), you have a Tracking ID (which begins with "UA-")."
You cannot have the property be a Google Analytics 4 property with a web data stream and have a view page as well. If you want the View page, then when you create the property, make sure its Universal Analytics.
Hope this helps, I'm new to this game.

Google Analytics UserID API extraction

Trying to extract a userID from GoogleAnalytics. This is to view which user is the using the website most and least.
I would to retrieve the top 5 user IDs and bottom 5 user IDs that were passed using either:
gtag('config', 'GA_TRACKING_ID', {
'user_id': 'USER_ID'
});
OR
using a custom dimension... ( https://support.google.com/analytics/answer/2709828?hl=en )
I'm (vaguely) aware of policies and TOS to keep 'non identifying' information on Google BUT there are posts online indicating you can link back to CMS data.
Steps so far
Google Analytics with UserID and view setup - Working in Google dashboard and showing filtered userID and All website data using the idea.
Requirements:
Extract page view and session data for each userId between a date
range (or all by default)
UserID via standard GA method
UserID via Custom dimension method
Any help, pointers or examples how someone has completed something like this are appreciated.
NOTE: This is to PULL data out of GA and manipulate/display it on an external system/dashboard.
Seen this which states it's not possible: Google analytics userID tracking
and this which states it (kind of) is google analytics API implementation for tracking a specific user activities in php
The solution I used:
Tracking
Create Google Analytics account
Create a new view by activating the UserID tracking (labeled NewView1)
Use https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets
i.e. Define your custom dimension
Get Analytics tracking code + Add custom definition code
Create a Custom report using the 'metrics' you want to see and filtering by the 'custom dimension' I created earlier.
(note: data took ~ 12 hours to be visible so don't expect to work instantly)
Front end tracking additions
gtag('config', 'GA_TRACKING_ID', {
'custom_map': {'dimension<Index>': 'dimension_name'}
});
// Sends the custom dimension to Google Analytics.
gtag('event', 'any_event_name', {'dimension_name': dimension_value});
Extraction
Create New Google Developer Console Project (API)
Use a Service Account to connect the API with Analytics ( https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php ) -- API -> credentials -> Create Credentials (Service Account key)
(assign role [mine was set to Project => View])
Save the Text file to your filesystem and rename to json as per examples
Add permissions to your Analytics project by copy/pasting the 'Email' from the Service account details into Analytics User Management.
Get the view ID of the data you wish to extract (Analtyics created in step 2 in tracking)
Use the sample Code (HelloAnalytics.php) to connect and extract data
Use your custom dimension to filter results
The dimension filter I used was $dimensions (see below)
...
$dimensions = new \Google_Service_AnalyticsReporting_Dimension();
$dimensions->setName('ga:dimension1'); // as per docs
// Create the ReportRequest object.
$request = new \Google_Service_AnalyticsReporting_ReportRequest();
$request->setViewId($VIEW_ID);
$request->setDateRanges($dateRange);
$request->setMetrics(array($sessions, $pageviews));
$request->setDimensions($dimensions);
From there I was able to see the same data via API that I could see in the custom report on analytics web.
NOTE: be careful of which Google project and view you're in while setting up
permissions and dimensions.
NOTE: using gtag() code and not Universal (ga()) js code
The answer is a very brief/rough summary of how I achieved my specific goal. It is not a one-size-fits all solution but hopefully it will give someone a better idea of how to set and extract custom variable data within Google.
The final result was data from the API. From there it's up to you.

Google analytics user explorer get user report

How do I get user report from user explorer, using GA API. Didn't manage to find any information about it here https://developers.google.com/analytics/. For instance in user explorer (audiences section) you can see a list of records having ids like 11111111111.2222222222 and I want to get information about user activity on the website for record with id 11111111111.2222222222 using GA API
While the latest GA release notes says the client ids have been "surfaced" (i.e. made visible) it is (at least currently) not available as a dimension via the API. So if you want to use it you'd have to add the client id as a custom dimension to your reports yourself. Off the top of my hat this should look something like this:
ga(function() {
var trackers = ga.getAll();
trackers.forEach(function(tracker) {
tracker.set('dimension1',tracker.get('clientId'));
});
});
Put before the pageview this would write the client id to your custom dimension with the index 1 (which you need to create in advance via the interface in properties->custom definitions). Should also work with multiple trackers on the same page.
This will of course not help you with data that's already been collected.

Resources