I'm creating a report in google data studio using google analytics data source. Now i want to use the filers in the page setting as an external input. So user can input the filter string and can see the data. Somehow i need to pass the string to the data studio so the report will be generated on the basis of that filter.
I appreciate any small help, thanks.
If i were you I would make the input in Google Sheets and direct string to there.
NExt step is link the string to Google Datastudio via "Add data". Even if it is only one cell it should work. Now you can try to somehow make the filter auto select this data and there you go.
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
I have a question when using the User ID feature to track users across devices/browsers.
If I activate the transfer service from GA to Bigquery in which field will I get that information. Would it use the same fullVisitorId column or a new one will be created?
thanks,
mike
The field is called userId.
More info can be found here. Please note that for this data to appear in BigQuery, you must make sure to select the User ID view when setting up the GA/BigQuery link.
The GUID will be new field and can be found as a custom dimension.
We have recently connected GA Premium to bigQuery to export all unsampled data from 1 property and 1 view. We decided to use the unfiltered view within our clients single property to make sure we get all data, however we still want to apply the "exclude internal IP ranges" filter to this data set in bigQuery. Is there a way to build a filter or query that removes internal visits from certain IP ranges or will we need to change the GA view that is connected to bigQuery (since only 1 view per property can be integrated)?
Thanks!
Amin
BigQuery will not house individual IP info because GA tracker attempts to preserve individual user privacy. You cannot filter data using a WHERE clause in BigQuery for i.p. information.
In BigQuery (BQ), you can create views, that are virtual tables created from a SQL query. Since you can't delete or update data, you can either delete and recreate the table or query the data and send the results to a new table.
Looking at the BQ export schema, I couldn't find a field that refers to the 'user IP address', I only see a 'geoNetwork' information.
So, if the field you're looking for is not exported to BQ, you might need to apply the "exclude internal IP ranges" filter in GA before exporting data.
Looking at the API documentation linked below makes me confused. The parameter name "ids" suggest due to its plural form of "id" that I should be able to fetch data from multiple tables in one request, right?
However, this (vaguely) suggest the opposite:
The unique table ID used to retrieve the Analytics Report data. This ID is provided by the element for each entry in the account feed. This value is composed of the ga: namespace and the view (profile) ID of the web property.
https://developers.google.com/analytics/devguides/reporting/core/v2/gdataReferenceDataFeed#ids
What I want to do is fetch visitor data from more than one table in one request and get them summed up and ready to use.
Is this possible?
Thanks!
This is not possible. You will need to make 2 separate requests for each table ID.