Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Firebase Analytics, one of the devices listed is just "iPhone", what does this correspond to?

I see devices like iPhone X, iPhone XR, iPhone XS, then just "iPhone" without any model specifier. Which does this correspond to?

Note it's not an aggregate value of all iPhone models as there's more "iPhone XR" models than there are "iPhone" models.

like image 388
Doug Smith Avatar asked Nov 19 '19 15:11

Doug Smith


People also ask

What is firebase for analytics iOS?

Firebase Analytics is a tool which allows you to do exactly that — it helps us to learn how our Android and iOS users are engaging with our application. From setup, it'll automatically begin tracking a defined set of events — meaning we can begin learning from the very first step.

How do I see all devices in firebase Analytics?

Firebase console: If you're running tests from the Firebase console, you can see a list of available devices during the Select dimensions step of the Run a test workflow. Google APIs Explorer: You can even look up the devices directly, without a Firebase project or the gcloud tool, using the Google APIs Explorer.


1 Answers

I had the same issue and looked up the raw data in big query filtering all events by device.mobile_os_hardware_model where device.mobile_model_name is "iPhone". Result was ~99% iPhone13,4 and ~1% iPhone14,6.

According to following gist they are the internal ids for iPhone 12 Pro Max and iPhone SE 3rd Gen in my case. https://gist.github.com/adamawolf/3048717

If you want to check on your side, go to https://console.cloud.google.com/bigquery and use e.g. following query (users with mobile_model_name = "iPhone" in last 7 days):

SELECT
 Value AS Device,
 COUNT(DISTINCT Id) AS Users, 
FROM (
 SELECT
  user_pseudo_id AS Id,
  device.mobile_os_hardware_model as Value
 FROM
  `<your_project>.<your_analytics>.events_*`,
  UNNEST(event_params) AS params
 WHERE
  SUBSTR(_TABLE_SUFFIX,1, 8) BETWEEN CAST(FORMAT_DATE("%Y%m%d", 
  DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)) AS string)
  AND CAST(FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 1 
  DAY)) AS string)
  AND device.mobile_model_name = "iPhone"
  )
GROUP BY Value
ORDER BY Device DESC

Query result

like image 98
thehrlein Avatar answered Sep 23 '22 15:09

thehrlein