I have used Firebase Analytics for logging user events in my app. Having got data of quite a lot of distinct users, I'm having a hard time understanding what an individual row means in the app_events table for a respective day.Is this row a session of user-events from activity onStart() to activity onStop() ? For a same userId, I'm getting multiple rows with different events in them.
Also, are the user-properties defined in the user-dimensions mutable or immutable i.e. as in, set values once, and can't over-write any further?
All help is appreciated.
The BigQuery Export Schema can be found in Help Center, and it states that :
Each row within a table corresponds to a bundle of events uploaded by
the Firebase Analytics SDK.
User Properties are mutable. However, we generally recommend that you use User Properties for static or slow-changing attributes to maximize their value in report-filtering.
each row in bigquery table of firebase events export should represent single firebase event.
source - google help> [GA4] BigQuery Export schema
Related
I'm looking to report on the outcome of a Firebase A/B test using Google Analytics / BigQuery tables.
To do this I need to identify the test group each user was in.
The Firebase documentation (https://firebase.google.com/docs/ab-testing/ab-concepts) suggests experiment and variant memberships are stored as user properties on every GA event in the normal GA event tables.
However, I can't find this information associated with GA events in the GA interface or BQ clickstream tables - I can only see it in the Firebase tables.
Where should I be looking? I've checked the Event Action, Event Category, Event Label etc. dimensions.
Use in your query to identify it
userProperty.value.string_value where userProperty.key = 'firebase_exp_000'
I seem to be missing session related information to the events that gets exported from Firebase to Big Query. More specifically, a unique identifier of each session (ga_session_id) and an ordinal number of the session count specific to the user that generates the events (ga_session_number).
All though they are not part of the export schema, they can be found in the documentation elsewhere and a recent blog post showing queries where they use these missing fields.
Do I have to enable something in order for them to start showing up in the event_params of my firebase analytics events or are these things not yet implemented? If not, is there any information on when this will happen?
edit: I'm using the Firebase Unity SDK.
Thanks in advance!
With this query I get the expected results:
SELECT event_params.value.int_value AS session_id
FROM `your table`, UNNEST (event_params) AS event_params
WHERE event_params.key = "ga_session_id"
GROUP BY 1
Note that in the blogpost query-example they use event_params.value.string_value which does not give any results
You also need to have the right SDK version (update from December)
After a solid load of searching I'm still not able to find a way to automate the export of Google Firebase Analytics data.
I need to import a few KPIs in an existing Google Sheet every month.
Isn't there any option to query the Firebase API through the Google Sheet and GET the KPI I need into a cell somehow every month?
There are ways (and even plugins) to do that for Google Analytics data. So I was sure it should be possible for firebase aswell.
To import Firebase analytics data into a Google Spreadsheet, you'll need to go through BigQuery. There's a Google Spreadsheet add-on called OWOX but I couldn't get it to work, so here's how to do it via creating a Google Apps Script:
In Firebase under Project settings (under the gear icon) -> Account Linking : find the BigQuery tile and sign up if you haven't already. This DOES require moving to the Blaze pay-as-you-go plan, but there's a generous amount of free usage in this tier so you're likely to avoid costs, but you do need to provide the usual billing info.
After signing up for Blaze, you'll go back under this Account Linking section and you'll see that BigQuery is now linked to your apps. Click on "Manage Linking" and you'll likely see "Syncing dataset" for awhile... like several hours (note, this page doesn't seem to refresh on its own so you'll have to refresh manually to check status). Once this is complete, you'll be able to access your data via BigQuery on the Google Spreadsheets side.
In your Google Spreadsheet, select Tools -> Script Editor. There's a good starter script here: https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
In Google Script editor, select Resources -> Advanced Google services and ensure you turn on BigQuery API. Now your script will have access to BigQuery data.
For my needs, I was just trying to get a count of some events in Firebase, so I wrote a function to invoke multiple queries like this:
function runQueries() {
var sql;
// fetch bigQuery data for Firebase app Create Wildlink (bottom row app)
sql = "#standardSQL\nSELECT count(event_dim) as event_count FROM `PROJECTID.TABLENAME.app_events_*`, UNNEST(event_dim) as event WHERE event.name = 'target_event_name'";
runQuery(sql, 1, 1, 'Label 1');
// fetch bigQuery data for Firebase app Share Extension (top row app)
sql = "#standardSQL\nSELECT count(event_dim) as event_count FROM `PROJECTID.TABLENAME.app_events_*`, UNNEST(event_dim) as event WHERE event.name = 'target_event_name_2'";
runQuery(sql, 3, 1, 'Label 2');
Browser.msgBox("Finished updating the results");
}
And then I changed the runQuery function to accept and use those params:
function runQuery(sql, insertRow, insertCol, label) {
...
sheet.getRange(insertRow, insertCol + 1, resultCount, tableRows[0].getF().length).setValues(resultValues);
sheet.getRange(insertRow, insertCol).setValue(label);
A few important notes about this method:
Events don't appear to be imported retroactively. From the moment you tie Firebase to BigQuery you start getting event data, but it doesn't import any old data.
Events are imported into day-parted tables. Note in the example above the wildcard in the table reference to span tables.
The example above uses StandardSQL (which was new to me). Note the #standardSQL\n in the above SQL strings. That changes from the default mode (LegacySQL). I ran into challenges using legacy SQL to get at the data.
Let me help you to deal with the OWOX BI BigQuery Add-on and simplify steps 3 to 6 from the answer above.
First of all, you really need to link BigQuery to your apps (Ian wrote good instruction how to do that in steps 1 and 2).
Then:
Add OWOX BI BigQuery Reports Add-on to your Chrome browser,
Open your Google Sheet, run add-on (Add-ons -> OWOX BI BigQuery Reports -> Add a new report),
Provide the add-on with the access to your BQ tables,
Select your Google BigQuery project in a drop-down list,
And create a new query (once again, Ian provide you with a good example of the query)
You can find some more details about OWOX BI BigQuery add-on in our Help Center. And feel free to write to us via email (bi#owox.com) or in chat - we’ll be happy to answer any of your questions.
Best regards, Eugene
The fields named domLatencyMetricsSample, pageLoadSample, speedMetricsSample, and userTimingSample in the latencyTracking record of the Bigquery Exports Schema (for Google Analytics) seem unnecessary since the export should contain all hits and not a sample of hits.
Is there something I'm not understanding?
Because they are still sampled in the BigQuery export:
https://groups.google.com/d/msg/ga-bigquery-developers/1KomNbPjdMw/XwoTkUCTBgAJ
I have been tasked with using Google Analytics to report of use of a desktop app so we can see which parts of the program are being used and how heavily, and potentially also see which companies are using which parts of the program (each company has a unique companyID). Ideally I'd like to be able to look at correlations (e.g., How many users who use report A also use process B?)
I currently have my program set to fire off a call to analytics. I've set it up to use the event tracking, but I'm open to app/screen tracking or something else if something would work better. I'm passing values like
v=1
&t=event // Event hit type
&tid=UA-XXXXX-Y // our ID; real code has valid value here
&cid=12345 // CustomerID
&ec=JobFinancialReport // Event Category
&ea=Run // Event Action
&el=Manager // Event label
&ev=7 // Event value
What I can't figure out is how in Google Analytics to set up reports that would show me something like:
CustomerID Category Label Total Hits Unique Users
12345 JobFinancialReport Manager 27 2
12345 MarketingReport1 Manager 6 4
I'm totally new to analytics so pardon my ignorance if I have some key misconception here. I've searched Googles sites and other questions here, but I may be wording my question incorrectly so I'm not finding something that's there. This is only one example; in some cases we might want to see how broadly each customer is using the program; in other cases we'd want to take the customerID out and just see how much a particular report is being used overall. Appreciate any guidance. Thanks.
The "cid" parameter is the client id, the value that is used to stitch single interactions into sessions and users.
The first problem that comes to mind with your setup is that the client id is not exposed in the user interface (with the single exception of the user explorer report) or the API.
You would need to implement this via a custom dimension (probably user scope, since it probably will never change for a given user) where you pass in the client id (you still need the cid parameter).
Then you could create a custom report (or create a report in Google Data Studio) with the custom value as primary dimension and your selected metric.
If you want to report "Unique Users" you would probably need to create a cid per logged-in user (if all users of the app have the same cid then you will always have but a single user reported). You should then probably create a second custom dimension for the company id, so you can segment your reports by company.
you can use custom reports in google analytics to get your desired output. here is how to create custom reports https://support.google.com/analytics/answer/1151300?hl=en