How to produce a histogram in Google Data Studio from Google Analytics - google-analytics

For a game I've written, we have certain analytics events. These go to Firebase/Google Analytics. I'm trying to visualise these in Google Data Studio without needing to write things in BigQuery. It feels like it should be possible, but the report isn't working.
Specifically: I have a custom event "level_completed" and that has a parameter of "time_taken" to record how long the player took to complete that level. This is captured in milliseconds.
I'd like to produce a histogram / distribution / heatmap / almost any visualisation to show me:
How long did people take to complete the level? I'd expect the underlying data to look like:
Minutes into the game
Number of users who completed the level at that duration
0
5
1
10
2
22
3
8
4
3
5
1
6
0
7
1
The custom event property is configured in Google Analytics as a "custom metric" (as GA advises that it shouldn't be a custom dimension if it has lots of possible different values.
When I connect this to Google Data Studio, using the Google Analytics connector, the data is visible as a metric, but not as a dimension.
I tried to turn it into some bins using the calculated field example in Calculating and displaying customer lifetime value histogram with BigQuery and Data Studio, but what I end up with is a table that just contains a single row which looks to be the sum or average of minutes into the game, and I can't get it to count the unique users by each minute-into-the-game value.
I would be grateful for anyone's guidance.

Related

Split GA4 conversions by corresponding event

I'm tracking several events on my website using Google Analytics 4.
Some of those events are more important and I'm considering them as conversions. However, they happen at different steps of the user journey, so each of them would have a different cost and return, so I'd like to consider them as different conversions, in the same way they correspond to different events.
The problem is, when I want to report on them (e.g. on Data Studio, or Google Ads UI, or even on Google Analytics funnels), you can only see the aggregated sum of conversions, rater than being able to select a specific conversion.
Is there a way to make GA4 (an Data Studio) either:
Split reports by specific conversions (rather than the total number of conversions)?
Split reports by events rather than conversions?
I feel like GA4 has been a step back in terms of report customisation and data analysis.
Thanks!

How is Firebase analytics custom metrics calculated

I'm tracking data associated with an event, for this I put a parameter of programProgress(0 - 1), I created this in the Firebase console as a custom metric.
When I check the console all I see is a graph(attached) of what seems to be the average, no segmentation(like custom dimensions), no explanations. I've gone through multiple documentations and haven't found an answer.
Questions:
Is this graph an average of all data collected, what's the formula?
Is there a way to segment it(preferably in the console) and see amounts for different values i.e. 20 hits for 0.3, 40 for 0.4 etc
Is there a way to segment and see values for different custom dimensions i.e. 30 hits of 0.9 for x dimension(preferably in the console)
Thanks
I believe the easiest way to achieve what you're looking for would be to go into the Google Analytics (GA4) console directly and using the Segment Comparison feature in either the User Explorer or Cohort Explorer techniques.
You can build segments using the programProgress parameter and create multiple for each range you want to specify.

Retrieving last 12 months data per ga:year

I'm trying to generate data for the last 12 months in Google Sheets using the GA add-on but ga:users is not showing same figure as GA web because my dimension is ga:year which makes it break it down to adding 2016 to 2017 data.
ga:month would break it down too much and give the overall figure a greater difference.
Any ideas how to fix this so that I can same data as web for users?
Thanks.
Here's my configuration:
Last year Partner
core
ga:xxxxxxxxxxx
01/08/2016
31/07/2017
ga:users
ga:sessions
ga:bounceRate
ga:pageviews
ga:pageviewsPerSession
ga:year
HIGHER_PRECISION
Adding the users from the two distinct years will not match the users from the web interface. The web interface is giving you the de-duplicated number of users.
i.e. anyone visiting the site in Nov-16 and Feb-17 is counted as one user in the web interface, while you are double counting them from your yearly output.

Google API Returning Sampled Data

I'm using the Google-Analytics API to query my analytics for data using the Google Analytics Spreadsheet Add-on We then use the spreadsheet data in Google Data studio for a dashboard to display the data.
Everything has been going well for the last few months, however over the last 48 hours we have begun to receive sampled data when we query the API using the spreadsheet add on. This is undesirable for how we are using the data.
The total results that we were getting before being returned was about 1100 results. We have altered the date range of the query to be only 3 days whereas before we were querying since the start of the year.
Initially that worked and the results were no longer sampled. Then 24 hours later the data appears to be sampled again.
The documentation says the following regarding sampling for the free account:
Analytics Standard: 500k sessions at the view level for the date range you are using
We are not using our analytics that heavily so I cannot understand why we would have hit the 500K limit?
It is also not clear to me what a "View Level" is? Any help on this would be greatly appreciated.

Unsampled reports automation for historical data

We have a client who receives 2-4 million visits a day, so off the bat we can only get unsampled reports because it exceeds google's limit :
500,000 maximum sessions for special queries where the data is not already stored.
We are attempting to collect Unique Visitors and Visits for a 1 day period. Using the Google API has proved frivolous as the data is sampled.
We have set up Unsampled reports on a daily basis that get dumped into Google Drive and our application picks up the new files and downloads them just fine. The problem we are running into is that we need 2 years worth of daily data for 20 reports. The maximum range we can run an unsampled report using google analytics web interface is 1 week before we exceed a query limit. So 52 weeks of reports x 2 years x 20 different reports to set up is 2080 scheduled unsampled reports and this is for 1 client only.
EDIT: Can we automate unsampled reports using GA API or any programming method to pull historical data with the constraints previously mentioned? Also we do have Google Analytics Premium
Cris G, the only way to avoid data-sampling in Google Analytics without having an access to Premium is day-parting technique = you split a data-request for selected time period into shorter period queries (typically days) and then add all the numbers up. If your profiles/views are not sampled if you look at daily numbers, this could solve you issue.
However, this doesn't work on Unique Visitors, since they will be unique every single time (you are running data requests on daily basis), so there will be most likely duplicates and inflated totals if your site is attracting lots of returning visitors.
To automate some of the work, I suggest using tools like Analytics Canvas. It can make your life much easier and I think it could be the perfect tool for what you need to. Bear in mind the limitations about unique visitors (and some other metrics).
Having said that, I still think the best choice would be to use the benefits of Premium and the ability to get unsampled data for your reports.

Resources